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

Function nb

resources/vega.min.js:16385–16468  ·  view source on GitHub ↗
(t, e)

Source from the content-addressed store, hash-verified

16383 return f;
16384 }
16385 function nb(t, e) {
16386 var n,
16387 r,
16388 i = e.items[0],
16389 o = i.datum,
16390 a = i.orient,
16391 s = i.bounds,
16392 u = i.x,
16393 l = i.y;
16394 return (
16395 i._bounds ? i._bounds.clear().union(s) : (i._bounds = s.clone()),
16396 s.clear(),
16397 (function (t, e, n) {
16398 var r = e.padding,
16399 i = r - n.x,
16400 o = r - n.y;
16401 if (e.datum.title) {
16402 var a = e.items[1].items[0],
16403 s = a.anchor,
16404 u = e.titlePadding || 0,
16405 l = r - a.x,
16406 c = r - a.y;
16407 switch (a.orient) {
16408 case I_:
16409 i += Math.ceil(a.bounds.width()) + u;
16410 break;
16411 case W_:
16412 case H_:
16413 break;
16414 default:
16415 o += a.bounds.height() + u;
16416 }
16417 switch (((i || o) && ib(t, n, i, o), a.orient)) {
16418 case I_:
16419 c += rb(e, n, a, s, 1, 1);
16420 break;
16421 case W_:
16422 ((l += rb(e, n, a, Q_, 0, 0) + u), (c += rb(e, n, a, s, 1, 1)));
16423 break;
16424 case H_:
16425 ((l += rb(e, n, a, s, 0, 0)),
16426 (c += rb(e, n, a, Q_, -1, 0, 1) + u));
16427 break;
16428 default:
16429 l += rb(e, n, a, s, 0, 0);
16430 }
16431 ((l || c) && ib(t, a, l, c),
16432 (l = Math.round(a.bounds.x1 - r)) < 0 &&
16433 (ib(t, n, -l, 0), ib(t, a, -l, 0)));
16434 } else (i || o) && ib(t, n, i, o);
16435 })(t, i, i.items[0].items[0]),
16436 (s = (function (t, e) {
16437 return (
16438 t.items.forEach((t) => e.union(t.bounds)),
16439 (e.x1 = t.padding),
16440 (e.y1 = t.padding),
16441 e
16442 );

Callers 1

transformFunction · 0.85

Calls 8

ibFunction · 0.85
rbFunction · 0.85
clearMethod · 0.80
widthMethod · 0.80
heightMethod · 0.80
tmFunction · 0.70
cloneMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected