fix: onLoad being triggered when elements aren't ready

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2021-11-20 01:20:47 +01:00
parent c40e4962e3
commit 990126b2b9
2 changed files with 20 additions and 21 deletions
+1
View File
@@ -185,6 +185,7 @@ store.dimensions = {
invoke(async () => {
await until(() => !isNaN(width.value) && width.value > 0 && !isNaN(height.value) && height.value > 0).toBeTruthy()
await until(store.elements).toMatch((y) => y.length > 0)
const instance: FlowInstance = {
fitView: (params = { padding: 0.1 }) => fitView(params),
zoomIn,