MCPcopy
hub / github.com/DHTMLX/gantt / collapsedSpanAround

Function collapsedSpanAround

samples/common/codehighlight/codemirror.js:1514–1522  ·  view source on GitHub ↗
(line, ch)

Source from the content-addressed store, hash-verified

1512 function collapsedSpanAtEnd(line) { return collapsedSpanAtSide(line, false) }
1513
1514 function collapsedSpanAround(line, ch) {
1515 var sps = sawCollapsedSpans && line.markedSpans, found;
1516 if (sps) { for (var i = 0; i < sps.length; ++i) {
1517 var sp = sps[i];
1518 if (sp.marker.collapsed && (sp.from == null || sp.from < ch) && (sp.to == null || sp.to > ch) &&
1519 (!found || compareCollapsedMarkers(found, sp.marker) < 0)) { found = sp.marker; }
1520 } }
1521 return found
1522 }
1523
1524 // Test whether there exists a collapsed span that partially
1525 // overlaps (covers the start or end, but not both) of a new span.

Callers 1

coordsCharFunction · 0.85

Calls 1

compareCollapsedMarkersFunction · 0.85

Tested by

no test coverage detected