From e2bac40b171ae82eeb44f134a19ba4aa6ddf324e Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Sat, 29 Mar 2014 23:05:46 +0000 Subject: [PATCH] Update range node ui --- nodes/core/logic/15-change.html | 11 ++++++++-- nodes/core/logic/16-range.html | 39 ++++++++++++++++++--------------- 2 files changed, 30 insertions(+), 20 deletions(-) diff --git a/nodes/core/logic/15-change.html b/nodes/core/logic/15-change.html index 9ebefe417..76f0d2736 100644 --- a/nodes/core/logic/15-change.html +++ b/nodes/core/logic/15-change.html @@ -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" : ""; diff --git a/nodes/core/logic/16-range.html b/nodes/core/logic/16-range.html index f6c9c84a8..d7f323776 100644 --- a/nodes/core/logic/16-range.html +++ b/nodes/core/logic/16-range.html @@ -16,27 +16,30 @@