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

Method mapUnit

resources/vega-lite.min.js:5136–5151  ·  view source on GitHub ↗
(e, t)

Source from the content-addressed store, hash-verified

5134 return super.map(e, t);
5135 }
5136 mapUnit(e, t) {
5137 const { parentEncoding: n, parentProjection: i } = t,
5138 r = vl(e.encoding, t.repeater),
5139 o = {
5140 ...e,
5141 ...(e.name
5142 ? { name: [t.repeaterPrefix, e.name].filter((e) => e).join("_") }
5143 : {}),
5144 ...(r ? { encoding: r } : {}),
5145 };
5146 if (n || i) return this.mapUnitWithParentEncodingOrProjection(o, t);
5147 const a = this.mapLayerOrUnit.bind(this);
5148 for (const e of this.nonFacetUnitNormalizers)
5149 if (e.hasMatchingType(o, t.config)) return e.run(o, t, a);
5150 return o;
5151 }
5152 mapRepeat(e, n) {
5153 return (function (e) {
5154 return !t.isArray(e.repeat) && J(e.repeat, "layer");

Callers 2

mapLayerOrUnitMethod · 0.45

Calls 7

vlFunction · 0.85
FFunction · 0.85
OFunction · 0.70
hasMatchingTypeMethod · 0.45
runMethod · 0.45
mapMethod · 0.45

Tested by

no test coverage detected