MCPcopy Create free account
hub / github.com/TruthHun/BookStack / wheelEventDelta

Function wheelEventDelta

static/mergely/lib/codemirror.js:3984–3990  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

3982 else if (safari) wheelPixelsPerUnit = -1/3;
3983
3984 var wheelEventDelta = function(e) {
3985 var dx = e.wheelDeltaX, dy = e.wheelDeltaY;
3986 if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) dx = e.detail;
3987 if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) dy = e.detail;
3988 else if (dy == null) dy = e.wheelDelta;
3989 return {x: dx, y: dy};
3990 };
3991 CodeMirror.wheelEventPixels = function(e) {
3992 var delta = wheelEventDelta(e);
3993 delta.x *= wheelPixelsPerUnit;

Callers 2

codemirror.jsFile · 0.70
onScrollWheelFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected