MCPcopy Create free account
hub / github.com/breck7/scroll / wheelEventDelta

Function wheelEventDelta

external/.scrollLibs.js:6163–6175  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

6161 }
6162
6163 function wheelEventDelta(e) {
6164 var dx = e.wheelDeltaX,
6165 dy = e.wheelDeltaY
6166 if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) {
6167 dx = e.detail
6168 }
6169 if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) {
6170 dy = e.detail
6171 } else if (dy == null) {
6172 dy = e.wheelDelta
6173 }
6174 return { x: dx, y: dy }
6175 }
6176 function wheelEventPixels(e) {
6177 var delta = wheelEventDelta(e)
6178 delta.x *= wheelPixelsPerUnit

Callers 2

wheelEventPixelsFunction · 0.85
onScrollWheelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected