update(examples): remove watchEffect from UpdateNodeExample.vue

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>

update(examples): fix style calculation in CustomNode.vue

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2021-11-25 15:21:36 +01:00
parent 708fa1f970
commit 729d3d5ca2
3 changed files with 6 additions and 12 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ const props = defineProps<CustomNodeProps>()
:key="`handle-${i}`"
type="source"
:position="Position.Right"
:style="{ top: 10 * i + props.data.handlePosition * 10 }"
:style="{ top: `${10 * i + props.data.handlePosition * 10}px` }"
/>
</div>
</template>
@@ -47,10 +47,7 @@ const onPaneClick = (evt: MouseEvent) =>
const toggleHandleCount = () =>
(elements.value = elements.value.map((el) => {
if (isEdge(el)) {
return el
}
if (isEdge(el)) return el
return { ...el, data: { ...el.data, handleCount: el.data?.handleCount === 1 ? 2 : 1 } }
}))