MCPcopy Create free account
hub / github.com/microsoft/SandDance / getPosition

Function getPosition

docs/app/js/sanddance-app.js:19334–19344  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

19332 };
19333}
19334function getPosition(e) {
19335 let xy = hasClientXY(e);
19336 if (xy) return xy;
19337 const te = e;
19338 if (te === null || te === void 0 ? void 0 : te.touches) for(let i = 0; i < te.touches.length; i++){
19339 let xy = hasClientXY(te.touches[i]);
19340 if (xy) return xy;
19341 }
19342 const el = e.target;
19343 if (el && el.getClientRects) return el.getClientRects()[0];
19344}
19345
19346},{"@parcel/transformer-js/src/esmodule-helpers.js":"jA2du"}],"bHInZ":[function(require,module,exports) {
19347var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");

Callers

nothing calls this directly

Calls 1

hasClientXYFunction · 0.70

Tested by

no test coverage detected