fix(core): wait until nodes are initialized

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 ee8ccfe2cc
commit c5fee5c4f5
2 changed files with 15 additions and 13 deletions
@@ -7,18 +7,16 @@ const { id, viewport, emits, d3Zoom, d3Selection, dimensions, ...rest } = useVue
until(() => d3Zoom.value && d3Selection.value && dimensions.value.width > 0 && dimensions.value.height > 0)
.toBeTruthy()
.then(() => {
setTimeout(() => {
// emit pane ready event
emits.paneReady({
id,
viewport,
emits,
d3Zoom,
d3Selection,
dimensions,
...rest,
})
}, 1)
// emit pane ready event
emits.paneReady({
id,
viewport,
emits,
d3Zoom,
d3Selection,
dimensions,
...rest,
})
})
</script>