chore: fix examples

Signed-off-by: bcakmakoglu <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
bcakmakoglu
2022-02-21 20:25:17 +01:00
committed by Braks
parent ca85d8002e
commit f44784b1d0
28 changed files with 382 additions and 275 deletions
+1 -1
View File
@@ -41,7 +41,7 @@ export default {
<path :id="props.id" class="vue-flow__edge-path" :d="edgePath" :marker-end="markerEnd" />
<text>
<textPath :href="`#${props.id}`" :style="{ fontSize: '12px' }" startOffset="50%" text-anchor="middle">
{{ props.data.text }}
{{ props.data?.text }}
</textPath>
</text>
</template>
+2 -2
View File
@@ -2,7 +2,7 @@
import CustomEdge from './CustomEdge.vue'
import CustomEdge2 from './CustomEdge2.vue'
import CustomLabel from './CustomLabel.vue'
import { VueFlow, MiniMap, Controls, Background, MarkerType, useVueFlow, useElementsState, Edge, Node } from '~/index'
import { VueFlow, MiniMap, Controls, Background, MarkerType, useVueFlow, Edge, Node } from '~/index'
const initialNodes: Node[] = [
{ id: '1', type: 'input', label: 'Input 1', position: { x: 250, y: 0 } },
@@ -71,7 +71,7 @@ const initialEdges: Edge[] = [
},
]
const { nodes, edges } = useElementsState({
const { nodes, edges } = useVueFlow({
nodes: initialNodes,
edges: initialEdges,
})