From 16997494abb048edc361386644098df1f238dfcb Mon Sep 17 00:00:00 2001 From: Braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Wed, 29 Dec 2021 11:49:10 +0100 Subject: [PATCH] update(zoom): set store instance before emitting pane-ready event * add missing generics on getters * replace ? notation with undefined (does not mean the exact same, i.e. `instance?: FlowInstance` will become `Ref | undefined` using `instance: FlowInstance | undefined` results in `Ref` Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com> --- src/container/ZoomPane/ZoomPane.vue | 2 +- src/types/flow.ts | 2 +- src/types/store.ts | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/container/ZoomPane/ZoomPane.vue b/src/container/ZoomPane/ZoomPane.vue index 9e465c14..222ae432 100644 --- a/src/container/ZoomPane/ZoomPane.vue +++ b/src/container/ZoomPane/ZoomPane.vue @@ -205,9 +205,9 @@ onMounted(async () => { getEdges: onLoadGetEdges(store), toObject: onLoadToObject(store), } - store.hooks.paneReady.trigger(instance) store.instance = instance store.fitViewOnInit && instance.fitView() + store.hooks.paneReady.trigger(instance) })