refactor: pass props to edge/nodewrapper separately

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2021-11-22 01:22:27 +01:00
parent a03f658794
commit c35673c622
18 changed files with 204 additions and 148 deletions
+3 -5
View File
@@ -87,11 +87,9 @@ export default (id: string, preloadedState: FlowState) => {
next = res
} else next = await parseElements(elements, this.nodes, this.edges, this.nodeExtent)
}
if (next) {
this.elements = [...next.nextNodes, ...next.nextEdges]
this.nodes = next?.nextNodes ?? []
this.edges = next?.nextEdges ?? []
}
this.elements = [...next.nextNodes, ...next.nextEdges]
this.nodes = next.nextNodes ?? []
this.edges = next.nextEdges ?? []
},
updateNodeDimensions({ id, nodeElement, forceUpdate }) {
const i = this.nodes.map((x) => x.id).indexOf(id)