fix cropped image size (#2097)

closes #2080 

### Change Type

- [x] `patch` — Bug fix

### Release Notes

- Fixes a rendering issue where cropped images were sometimes bleeding
outside their bounds.
This commit is contained in:
David Sheldrick 2023-10-17 13:17:12 +01:00 committed by GitHub
parent aaf810b015
commit 21ac5749d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -134,7 +134,10 @@ export class ImageShapeUtil extends BaseBoxShapeUtil<TLImageShape> {
/>
</div>
)}
<HTMLContainer id={shape.id} style={{ overflow: 'hidden' }}>
<HTMLContainer
id={shape.id}
style={{ overflow: 'hidden', width: shape.props.w, height: shape.props.h }}
>
<div className="tl-image-container" style={containerStyle}>
{asset?.props.src ? (
<div