MCPcopy Create free account
hub / github.com/breck7/scroll / lineIsHidden

Function lineIsHidden

external/.scrollLibs.js:1553–1572  ·  view source on GitHub ↗
(doc, line)

Source from the content-addressed store, hash-verified

1551 // are part of a visual line that starts with another line, or when
1552 // they are entirely covered by collapsed, non-widget span.
1553 function lineIsHidden(doc, line) {
1554 var sps = sawCollapsedSpans && line.markedSpans
1555 if (sps) {
1556 for (var sp = void 0, i = 0; i < sps.length; ++i) {
1557 sp = sps[i]
1558 if (!sp.marker.collapsed) {
1559 continue
1560 }
1561 if (sp.from == null) {
1562 return true
1563 }
1564 if (sp.marker.widgetNode) {
1565 continue
1566 }
1567 if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp)) {
1568 return true
1569 }
1570 }
1571 }
1572 }
1573 function lineIsHiddenInner(doc, line, span) {
1574 if (span.to == null) {
1575 var end = span.marker.find(1, true)

Callers 6

visualLineEndNoFunction · 0.85
LineViewFunction · 0.85
estimateHeightFunction · 0.85
.scrollLibs.jsFile · 0.85
addLineWidgetFunction · 0.85
markTextFunction · 0.85

Calls 1

lineIsHiddenInnerFunction · 0.85

Tested by

no test coverage detected