mirror of https://github.com/node-red/node-red.git
Improve with the node as context
parent
9e722ee9ac
commit
e1a24875f0
|
|
@ -312,21 +312,18 @@
|
|||
inputs: 1,
|
||||
outputs: 1,
|
||||
icon: "link-call.svg",
|
||||
contextMenu: [
|
||||
{
|
||||
label: RED._("node-red:link.actions.jumpToTarget"),
|
||||
contextMenu: function () {
|
||||
const node = this;
|
||||
return [{
|
||||
label: node._("link.actions.jumpToTarget"),
|
||||
onselect: function () {
|
||||
const selection = RED.view.selection();
|
||||
const node = selection.nodes[0];
|
||||
if (node) {
|
||||
const target = RED.nodes.node(node.links[0]);
|
||||
if (target) {
|
||||
RED.view.reveal(target.id);
|
||||
}
|
||||
const target = RED.nodes.node(node.links[0]);
|
||||
if (target) {
|
||||
RED.view.reveal(target.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
}];
|
||||
},
|
||||
inputLabels: function(i) {
|
||||
return this.name||this._("link.linkCall");
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue