(line, text, markedSpans, estimateHeight)
| 2794 | // invalidates cached information and tries to re-estimate the |
| 2795 | // line's height. |
| 2796 | function updateLine(line, text, markedSpans, estimateHeight) { |
| 2797 | line.text = text |
| 2798 | if (line.stateAfter) { |
| 2799 | line.stateAfter = null |
| 2800 | } |
| 2801 | if (line.styles) { |
| 2802 | line.styles = null |
| 2803 | } |
| 2804 | if (line.order != null) { |
| 2805 | line.order = null |
| 2806 | } |
| 2807 | detachMarkedSpans(line) |
| 2808 | attachMarkedSpans(line, markedSpans) |
| 2809 | var estHeight = estimateHeight ? estimateHeight(line) : 1 |
| 2810 | if (estHeight != line.height) { |
| 2811 | updateLineHeight(line, estHeight) |
| 2812 | } |
| 2813 | } |
| 2814 | |
| 2815 | // Detach a line from the document tree and its markers. |
| 2816 | function cleanUpLine(line) { |
no test coverage detected