refactor(elements): split edges and nodes

This commit is contained in:
moklick
2021-02-11 18:45:05 +01:00
parent 201a35dec2
commit ba5286a105
12 changed files with 166 additions and 190 deletions
+2 -4
View File
@@ -6,12 +6,10 @@ export const initialState: ReactFlowState = {
width: 0,
height: 0,
transform: [0, 0, 1],
elements: [],
// nodes: computed((state) => state.elements.filter(isNode)),
// edges: computed((state) => state.elements.filter(isEdge)),
nodes: [],
edges: [],
selectedElements: null,
selectedNodesBbox: { x: 0, y: 0, width: 0, height: 0 },
// viewportBox: computed((state) => ({ x: 0, y: 0, width: state.width, height: state.height })),
d3Zoom: null,
d3Selection: null,