Browse Source

chore(nc-gui): use css to toggle edge text visibility

pull/4071/head
braks 2 years ago
parent
commit
aee8d7ad14
  1. 4
      packages/nc-gui/components/erd/RelationEdge.vue

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

@ -92,9 +92,11 @@ export default {
<Transition name="layout"> <Transition name="layout">
<EdgeText <EdgeText
v-if="data.label?.length > 0 && (selected || isHovering)" v-if="data.label?.length > 0"
:key="`edge-text-${id}.${showSkeleton}`" :key="`edge-text-${id}.${showSkeleton}`"
class="color-transition"
:class="[ :class="[
selected || isHovering ? 'opacity-100' : 'opacity-0 !pointer-events-none',
showSkeleton ? '!text-6xl' : '!text-xs', showSkeleton ? '!text-6xl' : '!text-xs',
`nc-erd-table-label-${data.label.toLowerCase().replace(' ', '-').replace('\(', '').replace(')', '')}`, `nc-erd-table-label-${data.label.toLowerCase().replace(' ', '-').replace('\(', '').replace(')', '')}`,
]" ]"

Loading…
Cancel
Save