diff --git a/packages/editor-ui/src/components/canvas/elements/edges/CanvasEdge.vue b/packages/editor-ui/src/components/canvas/elements/edges/CanvasEdge.vue index 479c0542bf..f23d3c6c33 100644 --- a/packages/editor-ui/src/components/canvas/elements/edges/CanvasEdge.vue +++ b/packages/editor-ui/src/components/canvas/elements/edges/CanvasEdge.vue @@ -74,15 +74,29 @@ const edgeStyle = computed(() => ({ stroke: isHovered.value ? 'var(--color-primary)' : edgeColor.value, })); -const edgeLabelStyle = computed(() => ({ color: edgeColor.value })); +const edgeClasses = computed(() => ({ + [$style.edge]: true, + hovered: isHovered.value, +})); + +const edgeLabelStyle = computed(() => ({ + color: edgeColor.value, +})); const edgeToolbarStyle = computed(() => { const [, labelX, labelY] = path.value; return { transform: `translate(-50%, -50%) translate(${labelX}px,${labelY}px)`, + ...(isHovered.value ? { zIndex: 1 } : {}), }; }); +const edgeToolbarClasses = computed(() => ({ + [$style.edgeLabelWrapper]: true, + 'vue-flow__edge-label': true, + selected: props.selected, +})); + const path = computed(() => getCustomPath(props, { connectionType: connectionType.value, @@ -108,7 +122,7 @@ function onDelete() {