diff --git a/packages/node_modules/@node-red/nodes/core/function/89-trigger.html b/packages/node_modules/@node-red/nodes/core/function/89-trigger.html index b017dba1b..a7ab0356f 100644 --- a/packages/node_modules/@node-red/nodes/core/function/89-trigger.html +++ b/packages/node_modules/@node-red/nodes/core/function/89-trigger.html @@ -42,7 +42,7 @@ -
+
@@ -143,6 +143,7 @@ $("#node-then-type").on("change", function() { if ($(this).val() == "block") { $(".node-type-wait").hide(); + $(".node-type-override").hide(); $(".node-type-duration").hide(); $("#node-second-output").hide(); $("#node-input-second").prop('checked', false); @@ -151,6 +152,7 @@ else if ($(this).val() == "loop") { if ($("#node-input-duration").val() == 0) { $("#node-input-duration").val(250); } $(".node-type-wait").hide(); + $(".node-type-override").show(); $(".node-type-duration").show(); $("#node-second-output").hide(); $("#node-input-second").prop('checked', false); @@ -158,6 +160,7 @@ } else { if ($("#node-input-duration").val() == 0) { $("#node-input-duration").val(250); } $(".node-type-wait").show(); + $(".node-type-override").show(); $(".node-type-duration").show(); $("#node-second-output").show(); } diff --git a/packages/node_modules/@node-red/nodes/core/function/89-trigger.js b/packages/node_modules/@node-red/nodes/core/function/89-trigger.js index 478f772e3..7b5b820b7 100644 --- a/packages/node_modules/@node-red/nodes/core/function/89-trigger.js +++ b/packages/node_modules/@node-red/nodes/core/function/89-trigger.js @@ -172,14 +172,14 @@ module.exports = function(RED) { }); } return promise.then(() => { - if (node.duration === 0) { node.topics[topic].tout = 0; } + if (delayDuration === 0) { node.topics[topic].tout = 0; } else if (node.loop === true) { /* istanbul ignore else */ if (node.topics[topic].tout) { clearInterval(node.topics[topic].tout); } /* istanbul ignore else */ if (node.op1type !== "nul") { var msg2 = RED.util.cloneMessage(msg); - node.topics[topic].tout = setInterval(function() { node.send(RED.util.cloneMessage(msg2)); }, node.duration); + node.topics[topic].tout = setInterval(function() { node.send(RED.util.cloneMessage(msg2)); }, delayDuration); } } else { @@ -230,7 +230,7 @@ module.exports = function(RED) { }); }); } - else if ((node.extend === "true" || node.extend === true) && (node.duration > 0)) { + else if ((node.extend === "true" || node.extend === true) && (delayDuration > 0)) { /* istanbul ignore else */ if (node.op2type === "payl") { node.topics[topic].m2 = RED.util.cloneMessage(msg.payload); } /* istanbul ignore else */ diff --git a/packages/node_modules/@node-red/nodes/locales/en-US/function/89-trigger.html b/packages/node_modules/@node-red/nodes/locales/en-US/function/89-trigger.html index 3b5d96604..081b0c7a1 100644 --- a/packages/node_modules/@node-red/nodes/locales/en-US/function/89-trigger.html +++ b/packages/node_modules/@node-red/nodes/locales/en-US/function/89-trigger.html @@ -20,7 +20,7 @@

Inputs

delay number
-
Sets the delay, in milliseconds, to be applied to the message. This option only applies if the node is configured to allow the message to override the configured default delay interval. This does not apply when the node is configured to send at repeated intervals.
+
Sets the delay, in milliseconds, to be applied to the message. This option only applies if the node is configured to allow the message to override the configured default delay interval.
reset
If a message is received with this property, any timeout or repeat currently in progress will be cleared and no message triggered.