mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
@@ -172,8 +172,7 @@
|
||||
}
|
||||
else if ((this.duration * 1) < 0) {
|
||||
$("#node-then-type").val("loop");
|
||||
this.duration = this.duration * -1;
|
||||
$("#node-input-duration").val(this.duration);
|
||||
$("#node-input-duration").val(this.duration*-1);
|
||||
} else {
|
||||
$("#node-then-type").val("wait");
|
||||
}
|
||||
@@ -194,6 +193,7 @@
|
||||
$("#node-input-duration").val($("#node-input-duration").val() * -1);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
@@ -47,7 +47,10 @@ module.exports = function(RED) {
|
||||
this.extend = n.extend || "false";
|
||||
this.units = n.units || "ms";
|
||||
this.reset = n.reset || '';
|
||||
this.duration = n.duration || 250;
|
||||
this.duration = parseInt(n.duration);
|
||||
if (isNaN(this.duration)) {
|
||||
this.duration = 250;
|
||||
}
|
||||
if (this.duration < 0) {
|
||||
this.loop = true;
|
||||
this.duration = this.duration * -1;
|
||||
|
Reference in New Issue
Block a user