fix(viewport): emit paneReady when dimensions are ready

* Wait for viewport & nodes to have their dimensions established before emitting paneReady
* Avoids getting 0 values for dimensions on paneReady
This commit is contained in:
Braks
2022-04-11 11:30:10 +02:00
parent 4fbb16f6ad
commit e14cf124ff
4 changed files with 37 additions and 20 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
<script lang="ts" setup>
import { VueFlow, MiniMap, Controls, Background, isNode, useVueFlow, Elements } from '@braks/vue-flow/src/index'
import { VueFlow, MiniMap, Controls, Background, isNode, useVueFlow, Elements } from '@braks/vue-flow'
const elements = ref<Elements>([
{ id: '1', type: 'input', label: 'Node 1', position: { x: 250, y: 5 } },