fix(getNodesBounds): use absolute position by default, add options param

This commit is contained in:
moklick
2024-01-25 17:46:46 +01:00
parent e352f3cdc4
commit 19bcfe28a2
11 changed files with 33 additions and 18 deletions
+1 -1
View File
@@ -120,7 +120,7 @@ export function XYDrag<OnNodeDrag extends (e: any, nodes: any, node: any) => voi
let nodesBox: Box = { x: 0, y: 0, x2: 0, y2: 0 };
if (dragItems.length > 1 && nodeExtent) {
const rect = getNodesBounds(dragItems as unknown as NodeBase[], nodeOrigin);
const rect = getNodesBounds(dragItems as unknown as NodeBase[], { nodeOrigin });
nodesBox = rectToBox(rect);
}