diff --git a/js/views/scrollView.js b/js/views/scrollView.js index b28087eec8..f98c422a2e 100644 --- a/js/views/scrollView.js +++ b/js/views/scrollView.js @@ -315,6 +315,9 @@ ionic.views.Scroll = ionic.views.View.inherit({ startX: 0, startY: 0, + /** The amount to dampen mousewheel events */ + wheelDampen: 6, + /** The minimum size the scrollbars scale to while scrolling */ minScrollbarSizeX: 5, minScrollbarSizeY: 5, @@ -682,6 +685,9 @@ ionic.views.Scroll = ionic.views.View.inherit({ mousedown = false; }, false); + document.addEventListener("mousewheel", function(e) { + self.scrollBy(e.wheelDeltaX/self.options.wheelDampen, -e.wheelDeltaY/self.options.wheelDampen); + }); } },