🚸 (editor) Improve editor performance by rounding paths

Related to #575
This commit is contained in:
Baptiste Arnaud
2023-06-24 11:48:46 +02:00
parent 69254c3624
commit 0582ca74ac
6 changed files with 37 additions and 12 deletions

View File

@@ -170,8 +170,8 @@ const NonMemoizedDraggableGroupNode = ({
setIsMouseDown(false)
}
const newCoord = {
x: offsetX / graphPosition.scale,
y: offsetY / graphPosition.scale,
x: Number((offsetX / graphPosition.scale).toFixed(2)),
y: Number((offsetY / graphPosition.scale).toFixed(2)),
}
setCurrentCoordinates(newCoord)
onGroupDrag(newCoord)