mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 16:55:36 +03:00
extending implementation, bugfixes
This commit is contained in:
parent
a1e4111996
commit
3d5e333c6d
1 changed files with 11 additions and 29 deletions
40
main.js
40
main.js
|
@ -195,30 +195,21 @@ function add_custom_spinners() {
|
|||
up();
|
||||
});
|
||||
|
||||
$('.up', spinner).mousedown(function() {
|
||||
var self = $(this);
|
||||
self.data('mousedown', true);
|
||||
|
||||
$('.up', spinner).mousedown(function() {
|
||||
GUI.timeout_add('spinner', function() {
|
||||
if (self.data('mousedown')) {
|
||||
GUI.interval_add('spinner', function() {
|
||||
up();
|
||||
|
||||
GUI.interval_add('spinner', function() {
|
||||
up();
|
||||
}, 100);
|
||||
}
|
||||
}, 100, true);
|
||||
}, 250);
|
||||
});
|
||||
|
||||
$('.up', spinner).mouseup(function() {
|
||||
var self = $(this);
|
||||
self.data('mousedown', false);
|
||||
GUI.timeout_remove('spinner');
|
||||
GUI.interval_remove('spinner');
|
||||
});
|
||||
|
||||
$('.up', spinner).mouseleave(function() {
|
||||
var self = $(this);
|
||||
self.data('mousedown', false);
|
||||
$('.up', spinner).mouseleave(function() {
|
||||
GUI.timeout_remove('spinner');
|
||||
GUI.interval_remove('spinner');
|
||||
});
|
||||
|
||||
|
@ -227,30 +218,21 @@ function add_custom_spinners() {
|
|||
down();
|
||||
});
|
||||
|
||||
$('.down', spinner).mousedown(function() {
|
||||
var self = $(this);
|
||||
self.data('mousedown', true);
|
||||
|
||||
$('.down', spinner).mousedown(function() {
|
||||
GUI.timeout_add('spinner', function() {
|
||||
if (self.data('mousedown')) {
|
||||
GUI.interval_add('spinner', function() {
|
||||
down();
|
||||
|
||||
GUI.interval_add('spinner', function() {
|
||||
down();
|
||||
}, 100);
|
||||
}
|
||||
}, 100, true);
|
||||
}, 250);
|
||||
});
|
||||
|
||||
$('.down', spinner).mouseup(function() {
|
||||
var self = $(this);
|
||||
self.data('mousedown', false);
|
||||
GUI.timeout_remove('spinner');
|
||||
GUI.interval_remove('spinner');
|
||||
});
|
||||
|
||||
$('.down', spinner).mouseleave(function() {
|
||||
var self = $(this);
|
||||
self.data('mousedown', false);
|
||||
GUI.timeout_remove('spinner');
|
||||
GUI.interval_remove('spinner');
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue