diff --git a/examples/Basic/Basic.vue b/examples/Basic/Basic.vue index fc54e7cd..9b35105c 100644 --- a/examples/Basic/Basic.vue +++ b/examples/Basic/Basic.vue @@ -64,7 +64,6 @@ const toggleclasss = () => { :min-zoom="0.2" :max-zoom="4" :zoom-on-scroll="false" - :worker="true" @elements-remove="onElementsRemove" @connect="onConnect" @node-drag-stop="onNodeDragStop" diff --git a/src/container/VueFlow/VueFlow.vue b/src/container/VueFlow/VueFlow.vue index 8bed326f..df48aca1 100644 --- a/src/container/VueFlow/VueFlow.vue +++ b/src/container/VueFlow/VueFlow.vue @@ -163,8 +163,8 @@ invoke(async () => { ) }) -throttledWatch(elements, store.setElements, { flush: 'post', deep: true, throttle: 10 }) -throttledWatch(store.elements, (val) => (elements.value = val), { flush: 'post', deep: true, throttle: 10 }) +throttledWatch(elements, store.setElements, { flush: 'post', throttle: 10 }) +throttledWatch(store.elements, (val) => (elements.value = val), { flush: 'post', throttle: 10 }) const transitionName = computed(() => { let name = '' diff --git a/src/store/stateStore.ts b/src/store/stateStore.ts index b6c757b9..b30a739b 100644 --- a/src/store/stateStore.ts +++ b/src/store/stateStore.ts @@ -86,6 +86,8 @@ export default (id: string, preloadedState: FlowState) => { workerTerminate('SUCCESS') next = res } else next = await parseElements(elements, this.nodes, this.edges, this.nodeExtent) + } else { + next = await parseElements(elements, this.nodes, this.edges, this.nodeExtent) } this.elements = [...next.nextNodes, ...next.nextEdges] this.nodes = next.nextNodes ?? []