chore(autoPanSpeed): cleanup

This commit is contained in:
moklick
2024-07-04 18:03:22 +02:00
parent 3f259e9662
commit 62ba38cea9
3 changed files with 6 additions and 14 deletions
+1 -1
View File
@@ -202,7 +202,7 @@ export function XYDrag<OnNodeDrag extends (e: any, nodes: any, node: any) => voi
const { transform, panBy, autoPanSpeed } = getStoreItems();
const [xMovement, yMovement] = calcAutoPan(mousePosition, containerBounds, transform, autoPanSpeed);
const [xMovement, yMovement] = calcAutoPan(mousePosition, containerBounds, autoPanSpeed);
if (xMovement !== 0 || yMovement !== 0) {
lastPos.x = (lastPos.x ?? 0) - xMovement / transform[2];