fix(graph): always show edge filter/transform label
Drop the selected-only gate so the filter subject → transform destination hint is visible on every edge, not just the focused one.
This commit is contained in:
@@ -5,18 +5,17 @@ type RouteEdgeData = { filterSubject?: string; transformDest?: string };
|
||||
export default function RouteEdge(props: EdgeProps) {
|
||||
const {
|
||||
id, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition,
|
||||
selected, markerEnd, style, data,
|
||||
markerEnd, style, data,
|
||||
} = props;
|
||||
const [edgePath, labelX, labelY] = getSmoothStepPath({
|
||||
sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition,
|
||||
});
|
||||
const d = (data ?? {}) as RouteEdgeData;
|
||||
const showLabel = Boolean(selected);
|
||||
|
||||
return (
|
||||
<>
|
||||
<BaseEdge id={id} path={edgePath} markerEnd={markerEnd} style={style} />
|
||||
{showLabel && (d.filterSubject || d.transformDest) && (
|
||||
{(d.filterSubject || d.transformDest) && (
|
||||
<EdgeLabelRenderer>
|
||||
<div
|
||||
style={{
|
||||
|
||||
Reference in New Issue
Block a user