Skip to content
Snippets Groups Projects
Commit be4e86a0 authored by Maximilian Giller's avatar Maximilian Giller :squid:
Browse files

Improves workflow for connecting nodes

parent 59d119c6
No related branches found
No related tags found
1 merge request!2Implemented editor in the react framework
Pipeline #56837 passed
...@@ -235,8 +235,11 @@ export class Editor extends React.PureComponent<propTypes, stateTypes> { ...@@ -235,8 +235,11 @@ export class Editor extends React.PureComponent<propTypes, stateTypes> {
// Have no node connected, so select // Have no node connected, so select
this.selectNode(node); this.selectNode(node);
} else if (!this.state.selectedNode.equals(node)) { } else if (!this.state.selectedNode.equals(node)) {
const selected = this.state.selectedNode;
// Already have *other* node selected, so connect // Already have *other* node selected, so connect
this.state.selectedNode.connect(node); this.state.selectedNode.connect(node);
// Re-select original node for easier workflow
this.selectNode(selected);
} }
} else if (this.state.keys["Control"]) { } else if (this.state.keys["Control"]) {
// Delete node when control is pressed // Delete node when control is pressed
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment