From 9b04732e5a1544afa6d30f99cd6267cc398ab72e Mon Sep 17 00:00:00 2001 From: nik Date: Fri, 25 Jul 2025 08:26:55 +0300 Subject: [PATCH] fix: BROS-187: Snap to pixel on transform --- web/libs/editor/src/regions/RectRegion.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/libs/editor/src/regions/RectRegion.jsx b/web/libs/editor/src/regions/RectRegion.jsx index b144d3e8fd72..fa9fc7bb29bb 100644 --- a/web/libs/editor/src/regions/RectRegion.jsx +++ b/web/libs/editor/src/regions/RectRegion.jsx @@ -504,7 +504,7 @@ const HtxRectangleView = ({ item, setShapeRef }) => { t.setAttr("scaleX", 1); t.setAttr("scaleY", 1); - if (self.control?.snap === "pixel") { + if (item.control?.snap === "pixel") { // If snap is enabled, we need to snap the coordinates to the pixel grid - // Sync Konva shape attributes back to computed canvas coordinates to cause a re-render // Canvas coordinates are updated in the setPosition method