refactor(flow)!: properly nest components

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 6bdea72b20
commit c96f62f622
12 changed files with 121 additions and 149 deletions
+3 -3
View File
@@ -29,10 +29,10 @@ const addRandomNode = () => {
const nodeId = (elements.value.length + 1).toString()
const newNode: Node = {
id: nodeId,
data: { label: `Node: ${nodeId}` },
label: `Node: ${nodeId}`,
position: { x: Math.random() * window.innerWidth, y: Math.random() * window.innerHeight },
} as Node
elements.value = [...elements.value, newNode]
elements.value.push(newNode)
}
</script>
<template>
@@ -41,7 +41,7 @@ const addRandomNode = () => {
@load="onLoad"
@element-click="onElementClick"
@elements-remove="onElementsRemove"
@connect="(p) => onConnect(p)"
@connect="onConnect"
@node-drag-stop="onNodeDragStop"
>
<MiniMap />