(line, text, markedSpans, estimateHeight)
| 28 | // invalidates cached information and tries to re-estimate the |
| 29 | // line's height. |
| 30 | export function updateLine(line, text, markedSpans, estimateHeight) { |
| 31 | line.text = text |
| 32 | if (line.stateAfter) line.stateAfter = null |
| 33 | if (line.styles) line.styles = null |
| 34 | if (line.order != null) line.order = null |
| 35 | detachMarkedSpans(line) |
| 36 | attachMarkedSpans(line, markedSpans) |
| 37 | let estHeight = estimateHeight ? estimateHeight(line) : 1 |
| 38 | if (estHeight != line.height) updateLineHeight(line, estHeight) |
| 39 | } |
| 40 | |
| 41 | // Detach a line from the document tree and its markers. |
| 42 | export function cleanUpLine(line) { |
no test coverage detected