refactor(core): trigger fitViewOnInit together with paneReady
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user