1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Add link label value as portLabels

This commit is contained in:
Dave Conway-Jones 2017-03-02 23:12:06 +00:00
parent 6cf53c611b
commit c4554b71d3

View File

@ -119,7 +119,7 @@
} }
return 0; return 0;
}); });
$.each(items, function(i, li){ $.each(items, function(i, li) {
nodeList.append(li); nodeList.append(li);
}); });
} }
@ -249,7 +249,7 @@
if (i > -1) { if (i > -1) {
n.links.splice(i,1); n.links.splice(i,1);
} }
} else if (!nodeMap[id].old && nodeMap[id].new){ } else if (!nodeMap[id].old && nodeMap[id].new) {
// Added id // Added id
i = n.links.indexOf(id); i = n.links.indexOf(id);
if (i === -1) { if (i === -1) {
@ -280,6 +280,9 @@
inputs:0, inputs:0,
outputs:1, outputs:1,
icon: "link-out.png", icon: "link-out.png",
outputLabels: function(i) {
return this.name||this._("link.linkIn");
},
label: function() { label: function() {
return this.name||this._("link.linkIn"); return this.name||this._("link.linkIn");
}, },
@ -307,6 +310,9 @@
inputs:1, inputs:1,
outputs:0, outputs:0,
icon: "link-out.png", icon: "link-out.png",
inputLabels: function(i) {
return this.name||this._("link.linkOut");
},
label: function() { label: function() {
return this.name||this._("link.linkOut"); return this.name||this._("link.linkOut");
}, },