reafactor(react/svelte): rename some util functions #3528
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user