mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Fix handling of max and min values in function outputs
This commit is contained in:
parent
199caccbc3
commit
ce31edc803
@ -454,9 +454,10 @@
|
|||||||
min: 0,
|
min: 0,
|
||||||
max: 500,
|
max: 500,
|
||||||
change: function(event, ui) {
|
change: function(event, ui) {
|
||||||
var value = this.value;
|
var value = parseInt(this.value);
|
||||||
if (!value.match(/^\d+$/)) { value = 1; }
|
value = isNaN(value) ? 1 : value;
|
||||||
else if (value < this.min) { value = this.min; }
|
value = Math.max(value, parseInt($(this).attr("aria-valuemin")));
|
||||||
|
value = Math.min(value, parseInt($(this).attr("aria-valuemax")));
|
||||||
if (value !== this.value) { $(this).spinner("value", value); }
|
if (value !== this.value) { $(this).spinner("value", value); }
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user