MCPcopy Index your code
hub / github.com/DHTMLX/gantt / lineLength

Function lineLength

samples/common/codehighlight/codemirror.js:1644–1660  ·  view source on GitHub ↗
(line)

Source from the content-addressed store, hash-verified

1642 // collapsed ranges (see markText) that might hide parts, and join
1643 // other lines onto it.
1644 function lineLength(line) {
1645 if (line.height == 0) { return 0 }
1646 var len = line.text.length, merged, cur = line;
1647 while (merged = collapsedSpanAtStart(cur)) {
1648 var found = merged.find(0, true);
1649 cur = found.from.line;
1650 len += found.from.ch - found.to.ch;
1651 }
1652 cur = line;
1653 while (merged = collapsedSpanAtEnd(cur)) {
1654 var found$1 = merged.find(0, true);
1655 len -= cur.text.length - found$1.from.ch;
1656 cur = found$1.to.line;
1657 len += cur.text.length - found$1.to.ch;
1658 }
1659 return len
1660 }
1661
1662 // Find the longest line in the document.
1663 function findMaxLine(cm) {

Callers 3

findMaxLineFunction · 0.85
codemirror.jsFile · 0.85

Calls 2

collapsedSpanAtStartFunction · 0.85
collapsedSpanAtEndFunction · 0.85

Tested by

no test coverage detected