From 6530e4041fd7c705937e7209e1f269d1c8b07af7 Mon Sep 17 00:00:00 2001 From: moklick Date: Sun, 31 May 2020 12:12:02 +0200 Subject: [PATCH] fix(projectFunc): don't scale grid size #261 --- src/utils/graph.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/utils/graph.ts b/src/utils/graph.ts index 263f2844..543d540d 100644 --- a/src/utils/graph.ts +++ b/src/utils/graph.ts @@ -62,12 +62,9 @@ export const pointToRendererPoint = ( }; if (snapToGrid) { - const transformedGridSizeX = snapX * tScale; - const transformedGridSizeY = snapY * tScale; - return { - x: transformedGridSizeX * Math.round(position.x / transformedGridSizeX), - y: transformedGridSizeY * Math.round(position.y / transformedGridSizeY), + x: snapX * Math.round(position.x / snapX), + y: snapY * Math.round(position.y / snapY), }; }