mirror of
https://github.com/OFFIS-ESC/constellation-analyzer
synced 2026-01-27 15:53:42 +00:00
fix: dont show anything in pane if more than one item is selected
This commit is contained in:
parent
79edc902c5
commit
8d8ff2d200
1 changed files with 2 additions and 2 deletions
|
|
@ -189,13 +189,13 @@ const GraphEditor = ({ onNodeSelect, onEdgeSelect }: GraphEditorProps) => {
|
||||||
edges: Edge[];
|
edges: Edge[];
|
||||||
}) => {
|
}) => {
|
||||||
// If a node is selected, notify parent
|
// If a node is selected, notify parent
|
||||||
if (selectedNodes.length > 0) {
|
if (selectedNodes.length == 1) {
|
||||||
const selectedNode = selectedNodes[0] as Actor;
|
const selectedNode = selectedNodes[0] as Actor;
|
||||||
onNodeSelect(selectedNode);
|
onNodeSelect(selectedNode);
|
||||||
// Don't call onEdgeSelect - parent will handle clearing edge selection
|
// Don't call onEdgeSelect - parent will handle clearing edge selection
|
||||||
}
|
}
|
||||||
// If an edge is selected, notify parent
|
// If an edge is selected, notify parent
|
||||||
else if (selectedEdges.length > 0) {
|
else if (selectedEdges.length == 1) {
|
||||||
const selectedEdge = selectedEdges[0] as Relation;
|
const selectedEdge = selectedEdges[0] as Relation;
|
||||||
onEdgeSelect(selectedEdge);
|
onEdgeSelect(selectedEdge);
|
||||||
// Don't call onNodeSelect - parent will handle clearing node selection
|
// Don't call onNodeSelect - parent will handle clearing node selection
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue