From 4588089bd653c94bb8ba697010770775f0d6a799 Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Sun, 21 Apr 2019 10:31:36 +0100 Subject: [PATCH] hide delay node reset label on deploy to close #2145 --- .../@node-red/nodes/core/core/89-delay.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/node_modules/@node-red/nodes/core/core/89-delay.js b/packages/node_modules/@node-red/nodes/core/core/89-delay.js index 882a46c14..ebb16bd5f 100644 --- a/packages/node_modules/@node-red/nodes/core/core/89-delay.js +++ b/packages/node_modules/@node-red/nodes/core/core/89-delay.js @@ -88,10 +88,11 @@ module.exports = function(RED) { }; } - var clearDelayList = function() { + var clearDelayList = function(s) { for (var i=0; i 1000) && (node.idList.length !== 0)) { node.status({fill:"blue",shape:"dot",text:" "}); } - if (msg.hasOwnProperty("reset")) { clearDelayList(); } + if (msg.hasOwnProperty("reset")) { clearDelayList(true); } } }); node.on("close", function() { clearDelayList(); }); @@ -145,7 +146,7 @@ module.exports = function(RED) { if ((delayvar >= 0) && (node.idList.length !== 0)) { node.status({fill:"blue",shape:"dot",text:delayvar/1000+"s"}); } - if (msg.hasOwnProperty("reset")) { clearDelayList(); } + if (msg.hasOwnProperty("reset")) { clearDelayList(true); } if (msg.hasOwnProperty("flush")) { flushDelayList(); } }); node.on("close", function() { clearDelayList(); }); @@ -267,7 +268,7 @@ module.exports = function(RED) { if ((node.timeout >= 1000) && (node.idList.length !== 0)) { node.status({fill:"blue",shape:"dot",text:parseInt(wait/10)/100+"s"}); } - if (msg.hasOwnProperty("reset")) { clearDelayList(); } + if (msg.hasOwnProperty("reset")) { clearDelayList(true); } if (msg.hasOwnProperty("flush")) { flushDelayList(); } }); node.on("close", function() { clearDelayList(); });