mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(scrollView): show bar with mouse wheel. Fixes #809
This commit is contained in:
@@ -687,8 +687,20 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
||||
mousedown = false;
|
||||
}, false);
|
||||
|
||||
var wheelShowBarFn = ionic.debounce(function() {
|
||||
console.log('SHOWFN');
|
||||
self.__fadeScrollbars('in');
|
||||
}, 500, true);
|
||||
|
||||
var wheelHideBarFn = ionic.debounce(function() {
|
||||
console.log('HIDEFN');
|
||||
self.__fadeScrollbars('out');
|
||||
}, 100, false);
|
||||
|
||||
document.addEventListener("mousewheel", function(e) {
|
||||
wheelShowBarFn();
|
||||
self.scrollBy(e.wheelDeltaX/self.options.wheelDampen, -e.wheelDeltaY/self.options.wheelDampen);
|
||||
wheelHideBarFn();
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user