Skip to content

Commit

Permalink
Fix mouse scroll for homescreen
Browse files Browse the repository at this point in the history
  • Loading branch information
Tung authored and Nguyen Thanh Trung committed Mar 11, 2014
1 parent 811136a commit a73f40b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions apps/homescreen/js/grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -349,11 +349,12 @@ var GridManager = (function() {
break;

case 'wheel':
if (evt.deltaMode === evt.DOM_DELTA_PAGE && evt.deltaX) {
// if (evt.deltaMode === evt.DOM_DELTA_PAGE && evt.deltaX) {
if (evt.deltaX || evt.deltaY) {
// XXX: Scroll one page at a time
if (evt.deltaX > 0 && currentPage < pages.length - 1) {
if (((evt.deltaX > 0) || (evt.deltaY > 0)) && currentPage < pages.length - 1) {
GridManager.goToNextPage();
} else if (evt.deltaX < 0 && currentPage > 0) {
} else if (((evt.deltaX < 0) || (evt.deltaY < 0)) && currentPage > 0) {
GridManager.goToPreviousPage();
}
evt.stopPropagation();
Expand Down

0 comments on commit a73f40b

Please sign in to comment.