refactor(core): remove suspension
This commit is contained in:
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user