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

Function LeafChunk

static/mergely/lib/codemirror.js:7223–7231  ·  view source on GitHub ↗
(lines)

Source from the content-addressed store, hash-verified

7221 // See also http://marijnhaverbeke.nl/blog/codemirror-line-tree.html
7222
7223 function LeafChunk(lines) {
7224 this.lines = lines;
7225 this.parent = null;
7226 for (var i = 0, height = 0; i < lines.length; ++i) {
7227 lines[i].parent = this;
7228 height += lines[i].height;
7229 }
7230 this.height = height;
7231 }
7232
7233 LeafChunk.prototype = {
7234 chunkSize: function() { return this.lines.length; },

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected