MCPcopy
hub / github.com/tdewolff/minify / clientToLocal

Function clientToLocal

_benchmarks/sample_echarts.js:1211–1230  ·  view source on GitHub ↗
(el, e, out, calculate)

Source from the content-addressed store, hash-verified

1209 var MOUSE_EVENT_REG = /^(?:mouse|pointer|contextmenu|drag|drop)|click/;
1210 var _calcOut$1 = [];
1211 function clientToLocal(el, e, out, calculate) {
1212 out = out || {};
1213 if (calculate || !env.canvasSupported) {
1214 calculateZrXY(el, e, out);
1215 }
1216 else if (env.browser.firefox
1217 && e.layerX != null
1218 && e.layerX !== e.offsetX) {
1219 out.zrX = e.layerX;
1220 out.zrY = e.layerY;
1221 }
1222 else if (e.offsetX != null) {
1223 out.zrX = e.offsetX;
1224 out.zrY = e.offsetY;
1225 }
1226 else {
1227 calculateZrXY(el, e, out);
1228 }
1229 return out;
1230 }
1231 function calculateZrXY(el, e, out) {
1232 if (env.domSupported && el.getBoundingClientRect) {
1233 var ex = e.clientX;

Callers 2

normalizeEventFunction · 0.85
sample_echarts.jsFile · 0.85

Calls 1

calculateZrXYFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…