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
@@ -22,7 +22,7 @@ export type NodesSelectionProps = {
const selector = (s: ReactFlowState) => {
const selectedNodes = s.nodes.filter((n) => n.selected);
const { width, height, x, y } = getNodesBounds(selectedNodes, s.nodeOrigin);
const { width, height, x, y } = getNodesBounds(selectedNodes, { nodeOrigin: s.nodeOrigin });
return {
width,