reafactor(react/svelte): rename some util functions #3528

This commit is contained in:
moklick
2023-11-13 10:45:06 +01:00
parent b368b14b22
commit 90912a6c1a
19 changed files with 109 additions and 128 deletions
+5 -4
View File
@@ -2,8 +2,8 @@ import {
infiniteExtent,
ConnectionMode,
updateNodes,
getRectOfNodes,
getTransformForBounds,
getNodesBounds,
getViewportForBounds,
Transform,
} from '@xyflow/system';
@@ -32,8 +32,9 @@ const getInitialState = ({
width: node.size?.width,
height: node.size?.height,
}));
const bounds = getRectOfNodes(nodesWithDimensions, [0, 0]);
transform = getTransformForBounds(bounds, width, height, 0.5, 2, 0.1);
const bounds = getNodesBounds(nodesWithDimensions, [0, 0]);
const { x, y, z } = getViewportForBounds(bounds, width, height, 0.5, 2, 0.1);
transform = [x, y, z];
}
return {