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<FlowInstance | undefined> | undefined`
using `instance: FlowInstance | undefined` results in `Ref<FlowInstance | undefined>`

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2022-02-21 20:25:17 +01:00
parent 082bc51599
commit 16997494ab
3 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -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)
})
</script>
<script lang="ts">