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) const viewportReady = ref(!isClient)
await until(() => !!(d3Zoom.value && d3Selection.value && dimensions.value.width > 0 && dimensions.value.height > 0)).toBe(true) until(
() =>
until(fitViewOnInitDone) !!(d3Zoom.value && d3Selection.value && dimensions.value.width > 0 && dimensions.value.height > 0 && fitViewOnInitDone.value),
.toBe(true) )
.toBe(true, { flush: 'post' })
.then(() => { .then(() => {
setTimeout(() => { setTimeout(() => {
viewportReady.value = true viewportReady.value = true
@@ -402,11 +402,9 @@ export default {
:is-selecting="isSelecting" :is-selecting="isSelecting"
:class="{ connecting: !!connectionStartHandle, dragging: paneDragging, draggable: shouldPanOnDrag }" :class="{ connecting: !!connectionStartHandle, dragging: paneDragging, draggable: shouldPanOnDrag }"
> >
<Suspense> <Transform>
<Transform> <slot />
<slot /> </Transform>
</Transform>
</Suspense>
</Pane> </Pane>
</div> </div>
</template> </template>