feat(nodes): add extent option

This commit is contained in:
moklick
2021-11-04 21:43:47 +01:00
parent fefcc441af
commit fdf2571402
7 changed files with 36 additions and 25 deletions
+1
View File
@@ -36,6 +36,7 @@ const initialNodes: Node[] = [
position: { x: 15, y: 15 },
className: 'light',
parentNode: '4',
extent: 'parent',
},
{
id: '4b',
+2 -2
View File
@@ -10,7 +10,7 @@ import ReactFlow, {
Node,
Connection,
Edge,
NodeExtent,
CoordinateExtent,
Position,
} from 'react-flow-renderer';
import dagre from 'dagre';
@@ -22,7 +22,7 @@ import './layouting.css';
const dagreGraph = new dagre.graphlib.Graph();
dagreGraph.setDefaultEdgeLabel(() => ({}));
const nodeExtent: NodeExtent = [
const nodeExtent: CoordinateExtent = [
[0, 0],
[1000, 1000],
];