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

Function Px

resources/vega.min.js:15886–15952  ·  view source on GitHub ↗
(t, e, n, r)

Source from the content-addressed store, hash-verified

15884 return e === I_ || e === W_;
15885 }
15886 function Px(t, e, n, r) {
15887 var i,
15888 o,
15889 a = e.items[0],
15890 s = a.datum,
15891 u = null != a.translate ? a.translate : 0.5,
15892 l = a.orient,
15893 c = (function (t) {
15894 let e = +t.grid;
15895 return [t.ticks ? e++ : -1, t.labels ? e++ : -1, e + +t.domain];
15896 })(s),
15897 f = a.range,
15898 h = a.offset,
15899 d = a.position,
15900 p = a.minExtent,
15901 g = a.maxExtent,
15902 m = s.title && a.items[c[2]].items[0],
15903 y = a.titlePadding,
15904 v = a.bounds,
15905 _ = m && zy(m),
15906 x = 0,
15907 b = 0;
15908 switch (
15909 (Lx.clear().union(v),
15910 v.clear(),
15911 (i = c[0]) > -1 && v.union(a.items[i].bounds),
15912 (i = c[1]) > -1 && v.union(a.items[i].bounds),
15913 l)
15914 ) {
15915 case j_:
15916 ((x = d || 0),
15917 (b = -h),
15918 (o = Math.max(p, Math.min(g, -v.y1))),
15919 v.add(0, -o).add(f, 0),
15920 m && jx(t, m, o, y, _, 0, -1, v));
15921 break;
15922 case I_:
15923 ((x = -h),
15924 (b = d || 0),
15925 (o = Math.max(p, Math.min(g, -v.x1))),
15926 v.add(-o, 0).add(0, f),
15927 m && jx(t, m, o, y, _, 1, -1, v));
15928 break;
15929 case W_:
15930 ((x = n + h),
15931 (b = d || 0),
15932 (o = Math.max(p, Math.min(g, v.x2))),
15933 v.add(0, 0).add(o, f),
15934 m && jx(t, m, o, y, _, 1, 1, v));
15935 break;
15936 case H_:
15937 ((x = d || 0),
15938 (b = r + h),
15939 (o = Math.max(p, Math.min(g, v.y2))),
15940 v.add(0, 0).add(f, o),
15941 m && jx(t, m, o, y, 0, 0, 1, v));
15942 break;
15943 default:

Callers 1

transformFunction · 0.85

Calls 7

zyFunction · 0.85
jxFunction · 0.85
UxFunction · 0.85
clearMethod · 0.80
tmFunction · 0.70
addMethod · 0.45
dirtyMethod · 0.45

Tested by

no test coverage detected