Skip to content

Commit 04e0218

Browse files
fix: BROS-263: Fix image aspect ratio when cached (#8113)
Co-authored-by: niklub <[email protected]>
1 parent f336467 commit 04e0218

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

web/libs/editor/src/components/ImageView/ImageView.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,7 @@ const PixelGridLayer = observer(({ item }) => {
507507
</Layer>
508508
);
509509
});
510+
510511
/**
511512
* Component that creates an overlay on top
512513
* of the image to support Magic Wand tool
@@ -1313,7 +1314,7 @@ const ImageLayer = observer(({ item }) => {
13131314
useEffect(() => {
13141315
const node = konvaImageRef.current;
13151316
if (node && loadedImage) {
1316-
node.cache();
1317+
node.cache({ pixelRatio: 1 });
13171318
node.filters([Konva.Filters.Brighten, Konva.Filters.Contrast]);
13181319
node.brightness(brightness);
13191320
node.contrast(contrast);

0 commit comments

Comments
 (0)