refactor(core): remove suspension

This commit is contained in:
braks
2024-01-29 21:56:44 +01:00
committed by Braks
parent 1eefc8860e
commit b65f43c5d8
3 changed files with 8 additions and 14 deletions
-5
View File
@@ -1,5 +0,0 @@
---
"@vue-flow/core": patch
---
Suspens transformationpane until dimensions exist
@@ -9,10 +9,11 @@ const { id, viewport, d3Zoom, d3Selection, dimensions, fitViewOnInitDone } = use
const viewportReady = ref(!isClient)
await until(() => !!(d3Zoom.value && d3Selection.value && dimensions.value.width > 0 && dimensions.value.height > 0)).toBe(true)
until(fitViewOnInitDone)
.toBe(true)
until(
() =>
!!(d3Zoom.value && d3Selection.value && dimensions.value.width > 0 && dimensions.value.height > 0 && fitViewOnInitDone.value),
)
.toBe(true, { flush: 'post' })
.then(() => {
setTimeout(() => {
viewportReady.value = true
@@ -402,11 +402,9 @@ export default {
:is-selecting="isSelecting"
:class="{ connecting: !!connectionStartHandle, dragging: paneDragging, draggable: shouldPanOnDrag }"
>
<Suspense>
<Transform>
<slot />
</Transform>
</Suspense>
<Transform>
<slot />
</Transform>
</Pane>
</div>
</template>