refactor(options)!: remove worker and store option

* either unnecessary, broken or needs more work

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2021-11-24 14:07:09 +01:00
parent 725dc8acb7
commit 708fa1f970
8 changed files with 83 additions and 206 deletions

View File

@@ -17,7 +17,7 @@ interface CustomEdgeProps<T = any> extends EdgeProps<T> {
const props = defineProps<CustomEdgeProps>()
const store = useVueFlow()
const onEdgeClick = (evt: Event, id: string) => {
const edge = store.edges.find((edge) => edge.id === id)
const edge = store.getEdges.find((edge) => edge.id === id)
if (edge) {
store.hooks.elementsRemove.trigger([edge])
}

View File

@@ -51,7 +51,6 @@ const updateElements = () => {
<template>
<VueFlow
v-model="elements"
:worker="true"
:loading="{ label: 'Loading...', transition: { name: 'fade', mode: 'out-in' } }"
@load="onLoad"
@elementsRemove="onElementsRemove"