chore(examples): update examples with new API for add/remove

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
braks
2023-05-11 15:33:42 +02:00
committed by Braks
parent 5610efa470
commit e464d7b8a5
27 changed files with 91 additions and 119 deletions
+5 -3
View File
@@ -19,15 +19,17 @@ const { nodes, edges } = useVueFlow({
{ id: 'e3-4', source: '3', target: '4' },
],
})
watchEffect(() => {
nodes.value.forEach((n) => (n.hidden = isHidden.value))
edges.value.forEach((e) => (e.hidden = isHidden.value))
watch(isHidden, (shouldHide) => {
nodes.value.forEach((n) => (n.hidden = shouldHide))
edges.value.forEach((e) => (e.hidden = shouldHide))
})
</script>
<template>
<VueFlow>
<MiniMap />
<Controls />
<div :style="{ position: 'absolute', left: '10px', top: '10px', zIndex: 4 }">