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

Function wheelEventDelta

static/editor.md/lib/codemirror/lib/codemirror.js:3826–3832  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

3824 else if (safari) wheelPixelsPerUnit = -1/3;
3825
3826 var wheelEventDelta = function(e) {
3827 var dx = e.wheelDeltaX, dy = e.wheelDeltaY;
3828 if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) dx = e.detail;
3829 if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) dy = e.detail;
3830 else if (dy == null) dy = e.wheelDelta;
3831 return {x: dx, y: dy};
3832 };
3833 CodeMirror.wheelEventPixels = function(e) {
3834 var delta = wheelEventDelta(e);
3835 delta.x *= wheelPixelsPerUnit;

Callers 2

codemirror.jsFile · 0.70
onScrollWheelFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected