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

Function h_

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

Source from the content-addressed store, hash-verified

15076 }
15077 }
15078 function h_(t, e, n) {
15079 let r, i, o;
15080 if ("radial" === e.gradient) {
15081 let r = rv(t, n++, "pattern", l_);
15082 (x_(r, {
15083 id: Vp + e.id,
15084 viewBox: "0,0,1,1",
15085 width: "100%",
15086 height: "100%",
15087 preserveAspectRatio: "xMidYMid slice",
15088 }),
15089 (r = rv(r, 0, "rect", l_)),
15090 x_(r, { width: 1, height: 1, fill: `url(${w_()}#${e.id})` }),
15091 x_((t = rv(t, n++, "radialGradient", l_)), {
15092 id: e.id,
15093 fx: e.x1,
15094 fy: e.y1,
15095 fr: e.r1,
15096 cx: e.x2,
15097 cy: e.y2,
15098 r: e.r2,
15099 }));
15100 } else
15101 x_((t = rv(t, n++, "linearGradient", l_)), {
15102 id: e.id,
15103 x1: e.x1,
15104 x2: e.x2,
15105 y1: e.y1,
15106 y2: e.y2,
15107 });
15108 for (r = 0, i = e.stops.length; r < i; ++r)
15109 ((o = rv(t, r, "stop", l_)),
15110 o.setAttribute("offset", e.stops[r].offset),
15111 o.setAttribute("stop-color", e.stops[r].color));
15112 return (iv(t, r), n);
15113 }
15114 function d_(t, e, n) {
15115 let r;
15116 return (

Callers 1

defsMethod · 0.85

Calls 4

rvFunction · 0.85
x_Function · 0.85
w_Function · 0.85
ivFunction · 0.85

Tested by

no test coverage detected