mirror of https://github.com/node-red/node-red.git
Fix handling of max and min values in function outputs
parent
199caccbc3
commit
ce31edc803
|
@ -454,9 +454,10 @@
|
|||
min: 0,
|
||||
max: 500,
|
||||
change: function(event, ui) {
|
||||
var value = this.value;
|
||||
if (!value.match(/^\d+$/)) { value = 1; }
|
||||
else if (value < this.min) { value = this.min; }
|
||||
var value = parseInt(this.value);
|
||||
value = isNaN(value) ? 1 : value;
|
||||
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); }
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue