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

Function wrappedLineExtent

samples/common/codehighlight/codemirror.js:2723–2729  ·  view source on GitHub ↗
(cm, lineObj, preparedMeasure, y)

Source from the content-addressed store, hash-verified

2721 }
2722
2723 function wrappedLineExtent(cm, lineObj, preparedMeasure, y) {
2724 y -= widgetTopHeight(lineObj);
2725 var end = lineObj.text.length;
2726 var begin = findFirst(function (ch) { return measureCharPrepared(cm, preparedMeasure, ch - 1).bottom <= y; }, end, 0);
2727 end = findFirst(function (ch) { return measureCharPrepared(cm, preparedMeasure, ch).top > y; }, begin, end);
2728 return {begin: begin, end: end}
2729 }
2730
2731 function wrappedLineExtentChar(cm, lineObj, preparedMeasure, target) {
2732 if (!preparedMeasure) { preparedMeasure = prepareMeasureForLine(cm, lineObj); }

Callers 2

wrappedLineExtentCharFunction · 0.85
coordsBidiPartWrappedFunction · 0.85

Calls 3

widgetTopHeightFunction · 0.85
findFirstFunction · 0.85
measureCharPreparedFunction · 0.85

Tested by

no test coverage detected