Basic node label editor

This commit is contained in:
Nick O'Leary
2017-02-06 13:23:42 +00:00
parent 47df5476ba
commit e7e3ed4923
5 changed files with 116 additions and 16 deletions

View File

@@ -1487,6 +1487,10 @@ RED.view = (function() {
function getPortLabel(node,portType,portIndex) {
var result;
var nodePortLabels = (portType === PORT_TYPE_INPUT)?node.inputLabels:node.outputLabels;
if (nodePortLabels && nodePortLabels[portIndex]) {
return nodePortLabels[portIndex];
}
var portLabels = (portType === PORT_TYPE_INPUT)?node._def.inputLabels:node._def.outputLabels;
if (typeof portLabels === 'string') {
result = portLabels;