From b1f541b63d7527118f3d4ef6afe7ef055ce1b023 Mon Sep 17 00:00:00 2001 From: Braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Sat, 4 Dec 2021 12:21:39 +0100 Subject: [PATCH] refactore(store)!: Remove transition and loading.transition property * Tranisitions break testing and are superflous Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com> --- examples/Stress/StressExample.vue | 2 +- src/container/VueFlow/VueFlow.vue | 201 ++++++++++++++---------------- src/types/flow.ts | 16 +-- src/utils/store.ts | 2 +- 4 files changed, 97 insertions(+), 124 deletions(-) diff --git a/examples/Stress/StressExample.vue b/examples/Stress/StressExample.vue index c6396d6e..7673cc2b 100644 --- a/examples/Stress/StressExample.vue +++ b/examples/Stress/StressExample.vue @@ -54,7 +54,7 @@ const updateElements = () => { diff --git a/src/types/flow.ts b/src/types/flow.ts index a73bcc89..363f9ea8 100644 --- a/src/types/flow.ts +++ b/src/types/flow.ts @@ -88,20 +88,6 @@ export type FitViewFunc = (fitViewOptions?: FitViewParams) => void export type ProjectFunc = (position: XYPosition) => XYPosition export type ToObjectFunc = () => FlowExportObject -export type Loading = - | { - label: string - transition?: - | string - | { - name: string - mode: string - } - style: CSSProperties - class: string - } - | boolean - export type FlowInstance = { zoomIn: () => void zoomOut: () => void @@ -151,5 +137,5 @@ export interface FlowOptions { preventScrolling?: boolean edgeUpdaterRadius?: number storageKey?: string - loading?: Loading + loading?: string } diff --git a/src/utils/store.ts b/src/utils/store.ts index 8c358810..c4ff174a 100644 --- a/src/utils/store.ts +++ b/src/utils/store.ts @@ -93,7 +93,7 @@ export const initialState = (): FlowState => ({ zoomActivationKeyCode: undefined, hooks: createHooks(), - loading: false, + loading: undefined, markerEndId: undefined, storageKey: undefined,