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

Method run

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

Source from the content-addressed store, hash-verified

10107 }
10108 class Yd extends Ed {
10109 run(e) {
10110 const t = [...e.children];
10111 if (!g(t, (e) => e instanceof wc) || e.numChildren() <= 1) return;
10112 const n = [];
10113 let i;
10114 for (const r of t)
10115 if (r instanceof wc) {
10116 let t = r;
10117 for (; 1 === t.numChildren(); ) {
10118 const [e] = t.children;
10119 if (!(e instanceof wc)) break;
10120 t = e;
10121 }
10122 (n.push(...t.children),
10123 i
10124 ? (e.removeChild(r),
10125 (r.parent = i.parent),
10126 i.parent.removeChild(i),
10127 (i.parent = t),
10128 this.setModified())
10129 : (i = t));
10130 } else n.push(r);
10131 if (n.length) {
10132 this.setModified();
10133 for (const e of n) (e.parent.removeChild(e), (e.parent = i));
10134 }
10135 }
10136 }
10137 class Xd extends $c {
10138 clone() {

Callers

nothing calls this directly

Calls 4

numChildrenMethod · 0.80
removeChildMethod · 0.80
setModifiedMethod · 0.80
gFunction · 0.70

Tested by

no test coverage detected