mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 22:35:23 +03:00
add inline comments
This commit is contained in:
parent
e2f10918a4
commit
ac9725928d
1 changed files with 3 additions and 1 deletions
4
main.js
4
main.js
|
@ -78,16 +78,18 @@ $(document).ready(function() {
|
|||
|
||||
tab_initialize_default();
|
||||
|
||||
// listen to all input change events and adjust the value withing limits if necessary
|
||||
// listen to all input change events and adjust the value within limits if necessary
|
||||
$("#content").on("change", 'input[type="number"]', function() {
|
||||
var min = parseFloat($(this).prop('min'));
|
||||
var max = parseFloat($(this).prop('max'));
|
||||
var val = parseFloat($(this).val());
|
||||
|
||||
// only adjust minimal end if bound is set
|
||||
if ($(this).prop('min')) {
|
||||
if (val < min) $(this).val(min);
|
||||
}
|
||||
|
||||
// only adjust maximal end if bound is set
|
||||
if ($(this).prop('max')) {
|
||||
if (val > max) $(this).val(max);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue