Implement that nodes can also be deselected with ctrl+click

This commit is contained in:
Jan Oberhauser
2019-07-17 19:05:03 +02:00
parent 416eb81a6e
commit 5054c7054d
3 changed files with 31 additions and 4 deletions

View File

@@ -156,6 +156,13 @@ export const mouseSelect = mixins(nodeIndex).extend({
this.updateSelectBox(e);
},
nodeDeselected (node: INodeUi) {
this.$store.commit('removeNodeFromSelection', node);
const nodeElement = `node-${this.getNodeIndex(node.name)}`;
// @ts-ignore
this.instance.removeFromDragSelection(nodeElement);
},
nodeSelected (node: INodeUi) {
this.$store.commit('addSelectedNode', node);
const nodeElement = `node-${this.getNodeIndex(node.name)}`;