MCPcopy
hub / github.com/jquery/jquery-mousewheel / shouldAdjustOldDeltas

Function shouldAdjustOldDeltas

jquery.mousewheel.js:229–240  ·  view source on GitHub ↗
( orgEvent, absDelta )

Source from the content-addressed store, hash-verified

227 }
228
229 function shouldAdjustOldDeltas( orgEvent, absDelta ) {
230
231 // If this is an older event and the delta is divisible by 120,
232 // then we are assuming that the browser is treating this as an
233 // older mouse wheel event and that we should divide the deltas
234 // by 40 to try and get a more usable deltaFactor.
235 // Side note, this actually impacts the reported scroll distance
236 // in older browsers and can cause scrolling to be slower than native.
237 // Turn this off by setting $.event.special.mousewheel.settings.adjustOldDeltas to false.
238 return special.settings.adjustOldDeltas && orgEvent.type === "mousewheel" &&
239 absDelta % 120 === 0;
240 }
241
242} );

Callers 1

handlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…