refactor(core): trigger fitViewOnInit together with paneReady

This commit is contained in:
braks
2024-01-29 21:56:44 +01:00
committed by Braks
parent a5091b9b0c
commit 3977875d0b
+7
View File
@@ -971,6 +971,13 @@ export function useActions(
.toBe(true)
.then(() => {
setTimeout(() => {
// todo: move this to when *nodes* are initialized instead of viewport
if (!state.fitViewOnInitDone && state.fitViewOnInit) {
viewportHelper.value.fitView()
}
state.fitViewOnInitDone = true
state.hooks.paneReady.trigger({
id,
emits,