Skip to content

Commit

Permalink
Fix for mouse/trachpad switching
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverfoster committed Apr 6, 2022
1 parent a40b729 commit 3d95cd4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions js/Wheel.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ export default class Wheel extends Backbone.Controller {
// This section is to ignore insignificant wheel events after a snap
// Insignificant events are smaller than the last amount or less than 10
if (this._isIgnoreAfterEnd) {
// If switching between the mouse and touchpad this._lastSnapAmount needs resetting
if (this._lastSnapAmount === 100 && amount < 100) this._lastSnapAmount = 0;
const isInsignificantAmount = (amount < 10 || amount < this._lastSnapAmount);
if (isInsignificantAmount) return true;
this._isIgnoreAfterEnd = false;
Expand Down

0 comments on commit 3d95cd4

Please sign in to comment.