(line, text, markedSpans, estimateHeight)
| 1691 | // invalidates cached information and tries to re-estimate the |
| 1692 | // line's height. |
| 1693 | function updateLine(line, text, markedSpans, estimateHeight) { |
| 1694 | line.text = text; |
| 1695 | if (line.stateAfter) { line.stateAfter = null; } |
| 1696 | if (line.styles) { line.styles = null; } |
| 1697 | if (line.order != null) { line.order = null; } |
| 1698 | detachMarkedSpans(line); |
| 1699 | attachMarkedSpans(line, markedSpans); |
| 1700 | var estHeight = estimateHeight ? estimateHeight(line) : 1; |
| 1701 | if (estHeight != line.height) { updateLineHeight(line, estHeight); } |
| 1702 | } |
| 1703 | |
| 1704 | // Detach a line from the document tree and its markers. |
| 1705 | function cleanUpLine(line) { |
no test coverage detected