MCPcopy Index your code
hub / github.com/documentationjs/documentation / getMousePosition

Function getMousePosition

src/default_theme/assets/split.js:256–259  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

254 // Supports touch events, but not multitouch, so only the first
255 // finger `touches[0]` is counted.
256 function getMousePosition(e) {
257 if ('touches' in e) { return e.touches[0][clientAxis] }
258 return e[clientAxis]
259 }
260
261 // Actually adjust the size of elements `a` and `b` to `offset` while dragging.
262 // calc is used to allow calc(percentage + gutterpx) on the whole split instance,

Callers 2

dragFunction · 0.85
startDraggingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected