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

Method mapLayerRepeat

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

Source from the content-addressed store, hash-verified

5157 : this.mapNonLayerRepeat(e, n);
5158 }
5159 mapLayerRepeat(e, t) {
5160 const { repeat: n, spec: i, ...r } = e,
5161 { row: o, column: a, layer: s } = n,
5162 { repeater: l = {}, repeaterPrefix: c = "" } = t;
5163 return o || a
5164 ? this.mapRepeat(
5165 {
5166 ...e,
5167 repeat: {
5168 ...(o ? { row: o } : {}),
5169 ...(a ? { column: a } : {}),
5170 },
5171 spec: { repeat: { layer: s }, spec: i },
5172 },
5173 t,
5174 )
5175 : {
5176 ...r,
5177 layer: s.map((e) => {
5178 const n = { ...l, layer: e },
5179 r = `${(i.name ? `${i.name}_` : "") + c}child__layer_${C(e)}`,
5180 o = this.mapLayerOrUnit(i, {
5181 ...t,
5182 repeater: n,
5183 repeaterPrefix: r,
5184 });
5185 return ((o.name = r), o);
5186 }),
5187 };
5188 }
5189 mapNonLayerRepeat(e, n) {
5190 const { repeat: i, spec: r, data: o, ...a } = e;
5191 !t.isArray(i) &&

Callers 1

mapRepeatMethod · 0.80

Calls 4

CFunction · 0.70
mapRepeatMethod · 0.45
mapMethod · 0.45
mapLayerOrUnitMethod · 0.45

Tested by

no test coverage detected