(cm, line)
| 1532 | // measurements in a row, can thus ensure that the set-up work is |
| 1533 | // only done once. |
| 1534 | function prepareMeasureForLine(cm, line) { |
| 1535 | var lineN = lineNo(line); |
| 1536 | var view = findViewForLine(cm, lineN); |
| 1537 | if (view && !view.text) |
| 1538 | view = null; |
| 1539 | else if (view && view.changes) |
| 1540 | updateLineForChanges(cm, view, lineN, getDimensions(cm)); |
| 1541 | if (!view) |
| 1542 | view = updateExternalMeasurement(cm, line); |
| 1543 | |
| 1544 | var info = mapFromLineView(view, line, lineN); |
| 1545 | return { |
| 1546 | line: line, view: view, rect: null, |
| 1547 | map: info.map, cache: info.cache, before: info.before, |
| 1548 | hasHeights: false |
| 1549 | }; |
| 1550 | } |
| 1551 | |
| 1552 | // Given a prepared measurement object, measures the position of an |
| 1553 | // actual character (or fetches it from the cache). |
no test coverage detected
searching dependent graphs…