fix: load hook timing
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -185,19 +185,22 @@ store.dimensions = {
|
|||||||
|
|
||||||
invoke(async () => {
|
invoke(async () => {
|
||||||
await until(() => !isNaN(width.value) && width.value > 0 && !isNaN(height.value) && height.value > 0).toBeTruthy()
|
await until(() => !isNaN(width.value) && width.value > 0 && !isNaN(height.value) && height.value > 0).toBeTruthy()
|
||||||
const instance: FlowInstance = {
|
await until(store.elements).toMatch((y) => y.length > 0)
|
||||||
fitView: (params = { padding: 0.1 }) => fitView(params),
|
await nextTick(() => {
|
||||||
zoomIn,
|
const instance: FlowInstance = {
|
||||||
zoomOut,
|
fitView: (params = { padding: 0.1 }) => fitView(params),
|
||||||
zoomTo,
|
zoomIn,
|
||||||
setTransform,
|
zoomOut,
|
||||||
project: onLoadProject(store),
|
zoomTo,
|
||||||
getElements: onLoadGetElements(store),
|
setTransform,
|
||||||
toObject: onLoadToObject(store),
|
project: onLoadProject(store),
|
||||||
}
|
getElements: onLoadGetElements(store),
|
||||||
store.hooks.load.trigger(instance)
|
toObject: onLoadToObject(store),
|
||||||
store.isReady = true
|
}
|
||||||
store.instance = instance
|
store.hooks.load.trigger(instance)
|
||||||
|
store.isReady = true
|
||||||
|
store.instance = instance
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
|
|||||||
Reference in New Issue
Block a user