Update range node ui

This commit is contained in:
Nick O'Leary
2014-03-29 23:05:46 +00:00
parent 99ab6eaafd
commit e2bac40b17
2 changed files with 30 additions and 20 deletions

View File

@@ -59,7 +59,7 @@
category: 'function',
defaults: {
action: {value:"replace",required:true},
property: {value:"payload"},
property: {value:"payload",required:true},
from: {value:"",validate: function(v) {
if (this.action == "change" && this.reg) {
try {
@@ -79,7 +79,14 @@
outputs: 1,
icon: "swap.png",
label: function() {
return this.name || this.action || "change";
if (this.name) {
return this.name;
}
if (this.action == "replace") {
return "set msg."+this.property;
} else {
return this.action+" msg."+this.property
}
},
labelStyle: function() {
return this.name ? "node_label_italic" : "";