From 708fa1f970c307c373d53634fb248d2e22715422 Mon Sep 17 00:00:00 2001 From: Braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Wed, 24 Nov 2021 14:07:09 +0100 Subject: [PATCH] refactor(options)!: remove worker and store option * either unnecessary, broken or needs more work Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com> --- examples/EdgeWithButton/ButtonEdge.vue | 2 +- examples/Stress/StressExample.vue | 1 - src/container/VueFlow/VueFlow.vue | 38 +++++------ src/store/stateStore.ts | 93 +++++++++----------------- src/types/flow.ts | 7 -- src/types/store.ts | 4 +- src/utils/store.ts | 68 +++++++++---------- src/workers/parseElements.ts | 76 --------------------- 8 files changed, 83 insertions(+), 206 deletions(-) delete mode 100644 src/workers/parseElements.ts diff --git a/examples/EdgeWithButton/ButtonEdge.vue b/examples/EdgeWithButton/ButtonEdge.vue index e8b23c28..1d67efe6 100644 --- a/examples/EdgeWithButton/ButtonEdge.vue +++ b/examples/EdgeWithButton/ButtonEdge.vue @@ -17,7 +17,7 @@ interface CustomEdgeProps extends EdgeProps { const props = defineProps() 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]) } diff --git a/examples/Stress/StressExample.vue b/examples/Stress/StressExample.vue index d527d67b..66675ebf 100644 --- a/examples/Stress/StressExample.vue +++ b/examples/Stress/StressExample.vue @@ -51,7 +51,6 @@ const updateElements = () => {