fix(core): wait until fitting view on init

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
braks
2023-03-02 08:47:38 +01:00
committed by Braks
parent ab78dc7de1
commit b509b11bfc
+6 -1
View File
@@ -147,7 +147,12 @@ export function useActions(state: State, getters: ComputedGetters): Actions {
}, [])
if (state.fitViewOnInit && !fitViewOnInitDone) {
viewportHelper.fitView()
until(() => viewportHelper.initialized)
.toBe(true)
.then(() => {
viewportHelper.fitView()
})
fitViewOnInitDone = true
}