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

Function eb

resources/vega.min.js:16316–16384  ·  view source on GitHub ↗
(t, e, n, r, i, o, a)

Source from the content-addressed store, hash-verified

16314 }
16315 }
16316 function eb(t, e, n, r, i, o, a) {
16317 const s = (function (t, e) {
16318 const n = t[e] || {};
16319 return (e, r) => (null != n[e] ? n[e] : null != t[e] ? t[e] : r);
16320 })(n, e),
16321 u = (function (t, e) {
16322 let n = -1 / 0;
16323 return (
16324 t.forEach((t) => {
16325 null != t.offset && (n = Math.max(n, t.offset));
16326 }),
16327 n > -1 / 0 ? n : e
16328 );
16329 })(t, s("offset", 0)),
16330 l = s("anchor", J_),
16331 c = l === Q_ ? 1 : l === Z_ ? 0.5 : 0,
16332 f = {
16333 align: bx,
16334 bounds: s("bounds", wx),
16335 columns: "vertical" === s("direction") ? 1 : t.length,
16336 padding: s("margin", 8),
16337 center: s("center"),
16338 nodirty: !0,
16339 };
16340 switch (e) {
16341 case I_:
16342 f.anchor = {
16343 x: Math.floor(r.x1) - u,
16344 column: Q_,
16345 y: c * (a || r.height() + 2 * r.y1),
16346 row: l,
16347 };
16348 break;
16349 case W_:
16350 f.anchor = {
16351 x: Math.ceil(r.x2) + u,
16352 y: c * (a || r.height() + 2 * r.y1),
16353 row: l,
16354 };
16355 break;
16356 case j_:
16357 f.anchor = {
16358 y: Math.floor(i.y1) - u,
16359 row: Q_,
16360 x: c * (o || i.width() + 2 * i.x1),
16361 column: l,
16362 };
16363 break;
16364 case H_:
16365 f.anchor = {
16366 y: Math.ceil(i.y2) + u,
16367 x: c * (o || i.width() + 2 * i.x1),
16368 column: l,
16369 };
16370 break;
16371 case Y_:
16372 f.anchor = { x: u, y: u };
16373 break;

Callers 1

transformFunction · 0.85

Calls 3

heightMethod · 0.80
widthMethod · 0.80
sFunction · 0.70

Tested by

no test coverage detected