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;
|
return;
|
||||||
}
|
}
|
||||||
var currentScrollLeft = scrollContainer.scrollLeft();
|
var currentScrollLeft = scrollContainer.scrollLeft();
|
||||||
scrollContainer.animate( { scrollLeft: dir }, 300);
|
scrollContainer.animate( { scrollLeft: dir }, 100);
|
||||||
var interval = setInterval(function() {
|
var interval = setInterval(function() {
|
||||||
var newScrollLeft = scrollContainer.scrollLeft()
|
var newScrollLeft = scrollContainer.scrollLeft()
|
||||||
if (newScrollLeft === currentScrollLeft) {
|
if (newScrollLeft === currentScrollLeft) {
|
||||||
@ -61,8 +61,8 @@ RED.tabs = (function() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
currentScrollLeft = newScrollLeft;
|
currentScrollLeft = newScrollLeft;
|
||||||
scrollContainer.animate( { scrollLeft: dir }, 300);
|
scrollContainer.animate( { scrollLeft: dir }, 100);
|
||||||
},300);
|
},100);
|
||||||
$(this).one('mouseup',function() {
|
$(this).one('mouseup',function() {
|
||||||
clearInterval(interval);
|
clearInterval(interval);
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user