Skip to content

Commit 4503bb2

Browse files
niklubnik
andauthored
fix: BROS-187: Snap to pixel on transform (#8045)
Co-authored-by: nik <[email protected]>
1 parent 0efb67e commit 4503bb2

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)