Skip to content

Commit

Permalink
Make the cross-links focusable
Browse files Browse the repository at this point in the history
so they stay highlighted even if I move the mouse somewhere else
  • Loading branch information
vogelsgesang committed Feb 1, 2024
1 parent 7123fe8 commit c71d24d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion query-graphs/src/ui/QueryGraph.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
transition-duration: .5s;
}

.query-graph .react-flow__edge.qg-crosslink:hover .react-flow__edge-path {
.query-graph .react-flow__edge.qg-crosslink:hover .react-flow__edge-path,
.query-graph .react-flow__edge.qg-crosslink:focus .react-flow__edge-path {
stroke: hsl(309, 84%, 36%);
stroke-width: 1.5px;
stroke-dasharray: 6 2;
Expand Down
1 change: 0 additions & 1 deletion query-graphs/src/ui/QueryGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ function QueryGraphInternal({treeDescription}: QueryGraphProps) {
elementsSelectable={true}
nodesDraggable={false}
nodesConnectable={false}
edgesFocusable={false}
nodesFocusable={false}
className={"query-graph"}
>
Expand Down
2 changes: 2 additions & 0 deletions query-graphs/src/ui/tree-layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export function layoutTree(
label: e.target.data.edgeLabel,
className: e.target.data.edgeClass,
style: style,
focusable: false,
} as Edge;
});

Expand All @@ -106,6 +107,7 @@ export function layoutTree(
source: sourceId,
target: targetId,
className: "qg-crosslink",
focusable: true,
});
}

Expand Down

0 comments on commit c71d24d

Please sign in to comment.