Skip to content

Commit

Permalink
Merge pull request impress#51 from OpenGrid/patch-1
Browse files Browse the repository at this point in the history
impressive mouse wheel support added
  • Loading branch information
bartaz committed Jan 12, 2012
2 parents 940a28b + 11e5ddc commit 8b3c38a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions js/impress.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,12 @@
}
});

document.addEventListener("mousewheel", function( event ) {
next = steps.indexOf( active ) - event.wheelDelta / Math.abs(event.wheelDelta);
next = next >= 0 ? steps[ next ] : steps[ steps.length-1 ];
select(next);
}, false);

var getElementFromUrl = function () {
// get id from url # by removing `#` or `#/` from the beginning,
// so both "fallback" `#slide-id` and "enhanced" `#/slide-id` will work
Expand Down

0 comments on commit 8b3c38a

Please sign in to comment.