(cm, lineView, lineN, dims)
| 829 | } |
| 830 | |
| 831 | function updateLineGutter(cm, lineView, lineN, dims) { |
| 832 | if (lineView.gutter) { |
| 833 | lineView.node.removeChild(lineView.gutter); |
| 834 | lineView.gutter = null; |
| 835 | } |
| 836 | var markers = lineView.line.gutterMarkers; |
| 837 | if (cm.options.lineNumbers || markers) { |
| 838 | var wrap = ensureLineWrapped(lineView); |
| 839 | var gutterWrap = lineView.gutter = |
| 840 | wrap.insertBefore(elt("div", null, "CodeMirror-gutter-wrapper", "position: absolute; left: " + |
| 841 | (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + "px"), |
| 842 | lineView.text); |
| 843 | if (cm.options.lineNumbers && (!markers || !markers["CodeMirror-linenumbers"])) |
| 844 | lineView.lineNumber = gutterWrap.appendChild( |
| 845 | elt("div", lineNumberFor(cm.options, lineN), |
| 846 | "CodeMirror-linenumber CodeMirror-gutter-elt", |
| 847 | "left: " + dims.gutterLeft["CodeMirror-linenumbers"] + "px; width: " |
| 848 | + cm.display.lineNumInnerWidth + "px")); |
| 849 | if (markers) for (var k = 0; k < cm.options.gutters.length; ++k) { |
| 850 | var id = cm.options.gutters[k], found = markers.hasOwnProperty(id) && markers[id]; |
| 851 | if (found) |
| 852 | gutterWrap.appendChild(elt("div", [found], "CodeMirror-gutter-elt", "left: " + |
| 853 | dims.gutterLeft[id] + "px; width: " + dims.gutterWidth[id] + "px")); |
| 854 | } |
| 855 | } |
| 856 | } |
| 857 | |
| 858 | function updateLineWidgets(lineView, dims) { |
| 859 | if (lineView.alignable) lineView.alignable = null; |
no test coverage detected