Skip to content

Commit df74588

Browse files
committed
Added selection of all nodes and edges in the graph
Resolves #13
1 parent 7901d80 commit df74588

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/Graph.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,10 @@ class Graph extends React.Component {
281281
}
282282
this.deleteSelectedComponents.call(this);
283283
}
284+
else if (event.key === 'a') {
285+
let components = this.graph0.selectAll('.node,.edge');
286+
this.selectComponents(components);
287+
}
284288
else if (event.key === '?') {
285289
this.props.onHelp();
286290
}

src/KeyboardShortcutsDialog.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import TableRow from '@material-ui/core/TableRow';
1414
import CloseIcon from '@material-ui/icons/Close';
1515

1616
const keyboardShortcuts = [
17+
{key: 'Ctrl-A', description: 'Select all nodes and edges.'},
1718
{key: 'Ctrl-C', description: 'Copy the selected node.'},
1819
{key: 'Ctrl-V', description: 'Paste the cut/copied node.'},
1920
{key: 'Ctrl-X', description: 'Cut the selected node.'},

0 commit comments

Comments
 (0)