diff --git a/packages/node_modules/@node-red/nodes/core/function/16-range.html b/packages/node_modules/@node-red/nodes/core/function/16-range.html
index 07bb1f080..1652a91db 100644
--- a/packages/node_modules/@node-red/nodes/core/function/16-range.html
+++ b/packages/node_modules/@node-red/nodes/core/function/16-range.html
@@ -10,6 +10,7 @@
+
diff --git a/packages/node_modules/@node-red/nodes/core/function/16-range.js b/packages/node_modules/@node-red/nodes/core/function/16-range.js
index a5dede4ea..61ffd53fb 100644
--- a/packages/node_modules/@node-red/nodes/core/function/16-range.js
+++ b/packages/node_modules/@node-red/nodes/core/function/16-range.js
@@ -32,11 +32,15 @@ module.exports = function(RED) {
if (value !== undefined) {
var n = Number(value);
if (!isNaN(n)) {
- if (node.action == "clamp") {
+ if (node.action === "drop") {
+ if (n < node.minin) { done(); return; }
+ if (n > node.maxin) { done(); return; }
+ }
+ if (node.action === "clamp") {
if (n < node.minin) { n = node.minin; }
if (n > node.maxin) { n = node.maxin; }
}
- if (node.action == "roll") {
+ if (node.action === "roll") {
var divisor = node.maxin - node.minin;
n = ((n - node.minin) % divisor + divisor) % divisor + node.minin;
}
diff --git a/packages/node_modules/@node-red/nodes/locales/en-US/function/16-range.html b/packages/node_modules/@node-red/nodes/locales/en-US/function/16-range.html
index b391f5c04..f25363565 100644
--- a/packages/node_modules/@node-red/nodes/locales/en-US/function/16-range.html
+++ b/packages/node_modules/@node-red/nodes/locales/en-US/function/16-range.html
@@ -34,11 +34,14 @@
the range specified within the target range.
Scale and wrap within the target range means that the result will be wrapped within the target range.
+Scale, but drop if outside input range means that the result will + be scaled, but any inputs outside of the inout range will be dropped.
For example an input 0 - 10 mapped to 0 - 100.
mode | input | output |
---|---|---|