Browse Source

revert(nc-gui,erd): use paneReady event to layout els

pull/4289/head
braks 2 years ago
parent
commit
268b4cc975
  1. 4
      packages/nc-gui/components/erd/Flow.vue

4
packages/nc-gui/components/erd/Flow.vue

@ -15,7 +15,7 @@ const props = defineProps<Props>()
const { tables, config } = toRefs(props)
const { $destroy, fitView, onNodesInitialized, viewport, onNodeDoubleClick } = useVueFlow({ minZoom: 0.05, maxZoom: 2 })
const { $destroy, fitView, onPaneReady, viewport, onNodeDoubleClick } = useVueFlow({ minZoom: 0.05, maxZoom: 2 })
const { layout, elements } = useErdElements(tables, config)
@ -32,7 +32,7 @@ function zoomIn(nodeId?: string) {
fitView({ nodes: nodeId ? [nodeId] : undefined, duration: 300, minZoom: 0.2 })
}
onNodesInitialized(() => {
onPaneReady(() => {
layout(showSkeleton.value)
setTimeout(() => {

Loading…
Cancel
Save