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

Function pd

resources/vega-lite.min.js:9071–9096  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

9069 : pd(e);
9070 }
9071 function pd(e) {
9072 const t = e.component.projection;
9073 if (!t || t.merged) return [];
9074 const n = t.combine(),
9075 { name: i } = n;
9076 if (t.data) {
9077 const r = { signal: `[${t.size.map((e) => e.signal).join(", ")}]` },
9078 o = t.data.reduce((t, n) => {
9079 const i = wn(n) ? n.signal : `data('${e.lookupDataSource(n)}')`;
9080 return (p(t, i) || t.push(i), t);
9081 }, []);
9082 if (o.length <= 0)
9083 throw new Error("Projection's fit didn't find any data sources");
9084 return [
9085 {
9086 name: i,
9087 size: r,
9088 fit: { signal: o.length > 1 ? `[${o.join(", ")}]` : o[0] },
9089 ...n,
9090 },
9091 ];
9092 }
9093 return [
9094 { name: i, translate: { signal: "[width / 2, height / 2]" }, ...n },
9095 ];
9096 }
9097 const gd = [
9098 "type",
9099 "clipAngle",

Callers 1

mdFunction · 0.70

Calls 5

combineMethod · 0.80
lookupDataSourceMethod · 0.80
wnFunction · 0.70
pFunction · 0.70
mapMethod · 0.45

Tested by

no test coverage detected