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

Method mark

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

Source from the content-addressed store, hash-verified

15285 );
15286 }
15287 mark(t, e) {
15288 const n = Hy[e.marktype],
15289 r = n.tag,
15290 i = [Zv, n.attr];
15291 t.open(
15292 "g",
15293 { class: ov(e), "clip-path": e.clip ? Gg(this, e, e.group) : null },
15294 Qv(e),
15295 { "pointer-events": "g" !== r && !1 === e.interactive ? "none" : null },
15296 );
15297 const o = (o) => {
15298 const a = this.href(o);
15299 if (
15300 (a && t.open("a", a),
15301 t.open(r, this.attr(e, o, i, "g" !== r ? r : null)),
15302 "text" === r)
15303 ) {
15304 const e = By(o);
15305 if (k(e)) {
15306 const n = { x: 0, dy: Ty(o) };
15307 for (let r = 0; r < e.length; ++r)
15308 t.open("tspan", r ? n : null)
15309 .text(Ny(o, e[r]))
15310 .close();
15311 } else t.text(Ny(o, e));
15312 } else if ("g" === r) {
15313 const r = o.strokeForeground,
15314 i = o.fill,
15315 a = o.stroke;
15316 (r && a && (o.stroke = null),
15317 t.open("path", this.attr(e, o, n.background, "bgrect")).close(),
15318 t.open("g", this.attr(e, o, n.content)),
15319 Um(o, (e) => this.mark(t, e)),
15320 t.close(),
15321 r && a
15322 ? (i && (o.fill = null),
15323 (o.stroke = a),
15324 t.open("path", this.attr(e, o, n.foreground, "bgrect")).close(),
15325 i && (o.fill = i))
15326 : t
15327 .open("path", this.attr(e, o, n.foreground, "bgfore"))
15328 .close());
15329 }
15330 (t.close(), a && t.close());
15331 };
15332 return (
15333 n.nested ? e.items && e.items.length && o(e.items[0]) : Um(e, o),
15334 t.close()
15335 );
15336 }
15337 href(t) {
15338 const e = t.href;
15339 let n;

Callers 2

_renderMethod · 0.95
oMethod · 0.95

Calls 5

ovFunction · 0.85
GgFunction · 0.85
QvFunction · 0.85
oFunction · 0.70
UmFunction · 0.70

Tested by

no test coverage detected