MCPcopy Create free account
hub / github.com/alignoth/alignoth / getItemBoundingClientRect

Method getItemBoundingClientRect

resources/vega.min.js:14240–14261  ·  view source on GitHub ↗
(t)

Source from the content-addressed store, hash-verified

14238 }
14239 }
14240 getItemBoundingClientRect(t) {
14241 const e = this.canvas();
14242 if (!e) return;
14243 const n = e.getBoundingClientRect(),
14244 r = this._origin,
14245 i = t.bounds,
14246 o = i.width(),
14247 a = i.height();
14248 let s = i.x1 + r[0] + n.left,
14249 u = i.y1 + r[1] + n.top;
14250 for (; t.mark && (t = t.mark.group); ) ((s += t.x || 0), (u += t.y || 0));
14251 return {
14252 x: s,
14253 y: u,
14254 width: o,
14255 height: a,
14256 left: s,
14257 top: u,
14258 right: s + o,
14259 bottom: u + a,
14260 };
14261 }
14262 }
14263 function uv(t, e, n, r) {
14264 t.element().setAttribute("title", r || "");

Callers

nothing calls this directly

Calls 3

canvasMethod · 0.95
widthMethod · 0.80
heightMethod · 0.80

Tested by

no test coverage detected