refactor(types): Remove internal __vf field

* fields are merged into the GraphNode / Node interface
* Remove passing props from VueFlow container, use injected state

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2021-12-20 19:29:52 +01:00
parent 3f0b0dbd70
commit f28e10b05a
17 changed files with 219 additions and 478 deletions
@@ -93,10 +93,10 @@ export default {
>
<template v-for="node of store.getNodes" :key="`mini-map-node-${node.id}`">
<slot
:x="node.position.x"
:y="node.position.y"
:width="node.__vf.width"
:height="node.__vf.height"
:x="node.computedPosition.x"
:y="node.computedPosition.y"
:width="node.width"
:height="node.height"
:style="node.style"
:class="nodeClassNameFunc(node)"
:color="nodeColorFunc(node)"
@@ -106,10 +106,10 @@ export default {
:shape-rendering="shapeRendering"
>
<MiniMapNode
:x="node.position.x"
:y="node.position.y"
:width="node.__vf.width"
:height="node.__vf.height"
:x="node.computedPosition.x"
:y="node.computedPosition.y"
:width="node.width"
:height="node.height"
:style="node.style"
:class="nodeClassNameFunc(node)"
:color="nodeColorFunc(node)"