Fix appearrence of switch node port label for flow/global ref. (#1793)

* fix appearrence of switch node port label for flow/global ref

* use RED.utils.parseContextKey
This commit is contained in:
Hiroyasu Nishiyama 2018-07-10 20:40:52 +09:00 committed by Nick O'Leary
parent 6e9fe3248a
commit 407e16e900
1 changed files with 7 additions and 1 deletions

View File

@ -99,11 +99,17 @@
}
return v;
}
function prop2name(key) {
var result = RED.utils.parseContextKey(key);
return result.key;
}
function getValueLabel(t,v) {
if (t === 'str') {
return '"'+clipValueLength(v)+'"';
} else if (t === 'msg' || t==='flow' || t==='global') {
} else if (t === 'msg') {
return t+"."+clipValueLength(v);
} else if (t === 'flow' || t === 'global') {
return t+"."+clipValueLength(prop2name(v));
}
return clipValueLength(v);
}