MCPcopy Create free account
hub / github.com/TruthHun/BookStack / BranchChunk

Function BranchChunk

static/editor.md/lib/codemirror/lib/codemirror.js:7048–7059  ·  view source on GitHub ↗
(children)

Source from the content-addressed store, hash-verified

7046 };
7047
7048 function BranchChunk(children) {
7049 this.children = children;
7050 var size = 0, height = 0;
7051 for (var i = 0; i < children.length; ++i) {
7052 var ch = children[i];
7053 size += ch.chunkSize(); height += ch.height;
7054 ch.parent = this;
7055 }
7056 this.size = size;
7057 this.height = height;
7058 this.parent = null;
7059 }
7060
7061 BranchChunk.prototype = {
7062 chunkSize: function() { return this.size; },

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected