Mouse Wheel ionScroll.wheelDampen = 6 instead of 1


#1

Is there a reason why it’s set to 6? Currently, it’ll only scroll 20px or 1 line of text at per wheel tick, which is noticeably slow. Why not set it to 1 which will cause it to use the native/OS set delta?

If anyone else ran into this and wants a temporary fix (for developing), here’s a simple bit of standalone code.

window.addEventListener('wheel', function() {
  var scrollView = angular.element(document.body).injector().get('$ionicScrollDelegate').getScrollView()
  if (scrollView) {
    scrollView.options.wheelDampen = 1;
  }
});

#2

This solution is mandatory for Ionic 1 and web Firefox to get a proper scrolling, as of 2017-05-22.

The desktop version of FF is very laggy. You might set your wheelDampen to 0.8, though, to get a feel similar to Chrome.

Just put the above code in your .run statement.