1
0
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:
Nick O'Leary 2016-10-15 20:58:27 +01:00
parent 714c254bab
commit 5b22ccfca6

View File

@ -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);
})