From 729d3d5ca2fe412dfb8cd99cd1babf954327bc29 Mon Sep 17 00:00:00 2001 From: Braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Wed, 24 Nov 2021 14:26:24 +0100 Subject: [PATCH] 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> --- examples/UpdateNode/UpdateNodeExample.vue | 11 ++++------- examples/UpdateNodeInternals/CustomNode.vue | 2 +- .../UpdateNodeInternalsExample.vue | 5 +---- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/examples/UpdateNode/UpdateNodeExample.vue b/examples/UpdateNode/UpdateNodeExample.vue index fa703e4a..c4c4ae88 100644 --- a/examples/UpdateNode/UpdateNodeExample.vue +++ b/examples/UpdateNode/UpdateNodeExample.vue @@ -29,23 +29,20 @@ const updateNode = () => { return el }) } - -watchEffect(() => { - updateNode() -}) +onMounted(updateNode) diff --git a/examples/UpdateNodeInternals/UpdateNodeInternalsExample.vue b/examples/UpdateNodeInternals/UpdateNodeInternalsExample.vue index 1fe64870..245a67c9 100644 --- a/examples/UpdateNodeInternals/UpdateNodeInternalsExample.vue +++ b/examples/UpdateNodeInternals/UpdateNodeInternalsExample.vue @@ -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 } } }))