fix(core): use noop viewport operations instead of waiting for promise

This commit is contained in:
braks
2023-07-19 19:12:29 +02:00
committed by Braks
parent 715206404b
commit 4d5bbab506
4 changed files with 46 additions and 92 deletions
+1 -8
View File
@@ -36,14 +36,7 @@ export function useViewport(state: State, getters: ComputedGetters) {
nodesInitialized.value = true
})
const isReady = computed(
() =>
!!d3Zoom &&
!!d3Selection &&
!!dimensions.width &&
!!dimensions.height &&
(getNodes.value.length ? nodesInitialized.value : true),
)
const isReady = computed(() => !!d3Zoom && !!d3Selection && !!dimensions.width && !!dimensions.height && nodesInitialized.value)
function zoom(scale: number, duration?: number) {
if (d3Selection && d3Zoom) {