Include origin directly in positionAbsolute of node

This commit is contained in:
peterkogo
2024-05-22 15:38:08 +02:00
parent 02250e972d
commit e81194d58a
15 changed files with 7354 additions and 5920 deletions
-1
View File
@@ -129,7 +129,6 @@ export function XYDrag<OnNodeDrag extends (e: any, nodes: any, node: any) => voi
for (const [id, dragItem] of dragItems) {
let nextPosition = { x: x - dragItem.distance.x, y: y - dragItem.distance.y };
if (snapToGrid) {
nextPosition = snapPosition(nextPosition, snapGrid);
}