Skip to content

Commit 9b04732

Browse files
author
nik
committed
fix: BROS-187: Snap to pixel on transform
1 parent f81b59e commit 9b04732

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web/libs/editor/src/regions/RectRegion.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ const HtxRectangleView = ({ item, setShapeRef }) => {
504504
t.setAttr("scaleX", 1);
505505
t.setAttr("scaleY", 1);
506506

507-
if (self.control?.snap === "pixel") {
507+
if (item.control?.snap === "pixel") {
508508
// If snap is enabled, we need to snap the coordinates to the pixel grid -
509509
// Sync Konva shape attributes back to computed canvas coordinates to cause a re-render
510510
// Canvas coordinates are updated in the setPosition method

0 commit comments

Comments
 (0)