Add ctrl-enter to edit a node and all references

This commit is contained in:
Ian Gulliver
2019-07-16 17:24:24 +00:00
parent ccf4299d5a
commit a66bee672d
5 changed files with 49 additions and 4 deletions

View File

@@ -22,6 +22,22 @@ class EditorNode extends EditorInputBase {
return false;
}
updateLabel() {
if (this.ctrlKey_) {
this.elem_.dispatchEvent(new CustomEvent(
'updateNodesRequest',
{
bubbles: true,
detail: {
oldLabel: this.lastLabel_,
newLabel: this.getLabel(),
},
}));
}
super.updateLabel();
}
static unserialize(ser) {
let node = new EditorNode(ser.id);
node.setLabel(ser.label);