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

Function LeafChunk

static/editor.md/lib/codemirror/lib/codemirror.js:7008–7016  ·  view source on GitHub ↗
(lines)

Source from the content-addressed store, hash-verified

7006 // See also http://marijnhaverbeke.nl/blog/codemirror-line-tree.html
7007
7008 function LeafChunk(lines) {
7009 this.lines = lines;
7010 this.parent = null;
7011 for (var i = 0, height = 0; i < lines.length; ++i) {
7012 lines[i].parent = this;
7013 height += lines[i].height;
7014 }
7015 this.height = height;
7016 }
7017
7018 LeafChunk.prototype = {
7019 chunkSize: function() { return this.lines.length; },

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected