diff --git a/packages/nc-gui/components/erd/utils.ts b/packages/nc-gui/components/erd/utils.ts index 99cb809eb9..384b140b70 100644 --- a/packages/nc-gui/components/erd/utils.ts +++ b/packages/nc-gui/components/erd/utils.ts @@ -44,9 +44,6 @@ interface Relation { type: 'mm' | 'hm' } -const nodeWidth = 300 -const nodeHeight = 50 - export function useErdElements(tables: MaybeRef, props: MaybeRef) { const elements = ref>([]) @@ -63,6 +60,9 @@ export function useErdElements(tables: MaybeRef, props: MaybeRef unref(tables)) const config = $computed(() => unref(props)) + const nodeWidth = 300 + const nodeHeight = $computed(() => (config.showViews && config.showAllColumns ? 50 : 40)) + const relations = computed(() => erdTables.value.reduce((acc, table) => { const meta = metasWithIdAsKey.value[table.id!] @@ -115,7 +115,7 @@ export function useErdElements(tables: MaybeRef, props: MaybeRef { @@ -147,18 +147,19 @@ export function useErdElements(tables: MaybeRef, props: MaybeRef, props: MaybeRef, props: MaybeRef