From dd5a8ef63e6788847ab9b3b8494f67f58d3663cf Mon Sep 17 00:00:00 2001 From: braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Sat, 17 Sep 2022 21:16:10 +0200 Subject: [PATCH] refactor(nc-gui): cleanup simple view for erd --- packages/nc-gui/assets/style.scss | 6 ++ packages/nc-gui/components/erd/SimpleView.vue | 70 ++++++++----------- packages/nc-gui/components/erd/TableNode.vue | 3 +- .../smartsheet-toolbar/ViewActions.vue | 2 +- 4 files changed, 38 insertions(+), 43 deletions(-) diff --git a/packages/nc-gui/assets/style.scss b/packages/nc-gui/assets/style.scss index f1d7e48405..3c4b69f3a6 100644 --- a/packages/nc-gui/assets/style.scss +++ b/packages/nc-gui/assets/style.scss @@ -249,3 +249,9 @@ a { transform: scale(75%); transform-origin: bottom right; } + +.nc-modal-erd { + .ant-modal { + transform: none !important; + } +} \ No newline at end of file diff --git a/packages/nc-gui/components/erd/SimpleView.vue b/packages/nc-gui/components/erd/SimpleView.vue index 3de85edb93..c269716578 100644 --- a/packages/nc-gui/components/erd/SimpleView.vue +++ b/packages/nc-gui/components/erd/SimpleView.vue @@ -24,8 +24,6 @@ const { metasWithIdAsKey } = useMetas() const { $destroy, fitView } = useVueFlow() -const isTransitioning = ref(true) - const nodes = ref([]) const edges = ref([]) @@ -180,9 +178,7 @@ const layoutNodes = () => { } const init = (reset = false) => { - if (reset) { - initDagre() - } + initDagre() populateInitialNodes() populateEdges() layoutNodes() @@ -192,48 +188,40 @@ const init = (reset = false) => { } } -initDagre() - -onBeforeMount(init) +init() onScopeDispose($destroy) watch([() => tables, () => config], () => init(true), { deep: true, flush: 'pre' }) - -useEventListener('transitionend', () => { - isTransitioning.value = false -}) diff --git a/packages/nc-gui/components/erd/TableNode.vue b/packages/nc-gui/components/erd/TableNode.vue index 3994139e58..6b901ef041 100644 --- a/packages/nc-gui/components/erd/TableNode.vue +++ b/packages/nc-gui/components/erd/TableNode.vue @@ -75,7 +75,7 @@ const relatedColumnId = (col: Record) =>
) => type="source" :position="Position.Right" /> + -