mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Speed up tab scrolling
This commit is contained in:
parent
714c254bab
commit
5b22ccfca6
@ -53,7 +53,7 @@ RED.tabs = (function() {
|
||||
return;
|
||||
}
|
||||
var currentScrollLeft = scrollContainer.scrollLeft();
|
||||
scrollContainer.animate( { scrollLeft: dir }, 300);
|
||||
scrollContainer.animate( { scrollLeft: dir }, 100);
|
||||
var interval = setInterval(function() {
|
||||
var newScrollLeft = scrollContainer.scrollLeft()
|
||||
if (newScrollLeft === currentScrollLeft) {
|
||||
@ -61,8 +61,8 @@ RED.tabs = (function() {
|
||||
return;
|
||||
}
|
||||
currentScrollLeft = newScrollLeft;
|
||||
scrollContainer.animate( { scrollLeft: dir }, 300);
|
||||
},300);
|
||||
scrollContainer.animate( { scrollLeft: dir }, 100);
|
||||
},100);
|
||||
$(this).one('mouseup',function() {
|
||||
clearInterval(interval);
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user