Skip to content

Commit

Permalink
Disabled animation for mouse wheel and keyboard navigation. Those bro…
Browse files Browse the repository at this point in the history
…ke with animation
  • Loading branch information
aivopaas committed Jan 28, 2011
1 parent 001d7bd commit 5090894
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions script/jquery.jscrollpane.js
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@
mwEvent,
function (event, delta, deltaX, deltaY) {
var dX = horizontalDragPosition, dY = verticalDragPosition;
jsp.scrollBy(deltaX * settings.mouseWheelSpeed, -deltaY * settings.mouseWheelSpeed);
jsp.scrollBy(deltaX * settings.mouseWheelSpeed, -deltaY * settings.mouseWheelSpeed, false);
// return true if there was no movement so rest of screen can scroll
return dX == horizontalDragPosition && dY == verticalDragPosition;
}
Expand All @@ -871,9 +871,6 @@
'focus.jsp',
function(e)
{
if (e.target === this) {
return;
}
scrollToElement(e.target, false);
}
);
Expand All @@ -889,23 +886,23 @@
var dX = horizontalDragPosition, dY = verticalDragPosition;
switch(keyDown) {
case 40: // down
jsp.scrollByY(settings.keyboardSpeed);
jsp.scrollByY(settings.keyboardSpeed, false);
break;
case 38: // up
jsp.scrollByY(-settings.keyboardSpeed);
jsp.scrollByY(-settings.keyboardSpeed, false);
break;
case 34: // page down
case 32: // space
jsp.scrollByY(paneHeight * settings.scrollPagePercent);
jsp.scrollByY(paneHeight * settings.scrollPagePercent, false);
break;
case 33: // page up
jsp.scrollByY(-paneHeight * settings.scrollPagePercent);
jsp.scrollByY(-paneHeight * settings.scrollPagePercent, false);
break;
case 39: // right
jsp.scrollByX(settings.keyboardSpeed);
jsp.scrollByX(settings.keyboardSpeed, false);
break;
case 37: // left
jsp.scrollByX(-settings.keyboardSpeed);
jsp.scrollByX(-settings.keyboardSpeed, false);
break;
}

Expand Down

0 comments on commit 5090894

Please sign in to comment.