From 6efcd4b5cc4a9540787e18ad397a053ffde07d04 Mon Sep 17 00:00:00 2001 From: Federico Ruggi <1081051+ruggi@users.noreply.github.com> Date: Fri, 6 Dec 2024 10:55:39 +0100 Subject: [PATCH] scale correctly --- .../canvas/controls/grid-controls.tsx | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/editor/src/components/canvas/controls/grid-controls.tsx b/editor/src/components/canvas/controls/grid-controls.tsx index 9362d108d06c..694719ff77cd 100644 --- a/editor/src/components/canvas/controls/grid-controls.tsx +++ b/editor/src/components/canvas/controls/grid-controls.tsx @@ -2684,19 +2684,24 @@ const SnapLine = React.memo( const labelHeight = 20 const isColumn = props.edge === 'column-start' || props.edge === 'column-end' + + const top = isColumn + ? props.container.y + : props.target.y + (props.edge === 'row-end' ? props.target.height : 0) + const left = !isColumn + ? props.container.x + : props.target.x + (props.edge === 'column-end' ? props.target.width : 0) + return (