(cm, lineView, lineN, dims)
| 951 | } |
| 952 | |
| 953 | function updateLineGutter(cm, lineView, lineN, dims) { |
| 954 | if (lineView.gutter) { |
| 955 | lineView.node.removeChild(lineView.gutter); |
| 956 | lineView.gutter = null; |
| 957 | } |
| 958 | var markers = lineView.line.gutterMarkers; |
| 959 | if (cm.options.lineNumbers || markers) { |
| 960 | var wrap = ensureLineWrapped(lineView); |
| 961 | var gutterWrap = lineView.gutter = elt("div", null, "CodeMirror-gutter-wrapper", "left: " + |
| 962 | (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + |
| 963 | "px; width: " + dims.gutterTotalWidth + "px"); |
| 964 | cm.display.input.setUneditable(gutterWrap); |
| 965 | wrap.insertBefore(gutterWrap, lineView.text); |
| 966 | if (lineView.line.gutterClass) |
| 967 | gutterWrap.className += " " + lineView.line.gutterClass; |
| 968 | if (cm.options.lineNumbers && (!markers || !markers["CodeMirror-linenumbers"])) |
| 969 | lineView.lineNumber = gutterWrap.appendChild( |
| 970 | elt("div", lineNumberFor(cm.options, lineN), |
| 971 | "CodeMirror-linenumber CodeMirror-gutter-elt", |
| 972 | "left: " + dims.gutterLeft["CodeMirror-linenumbers"] + "px; width: " |
| 973 | + cm.display.lineNumInnerWidth + "px")); |
| 974 | if (markers) for (var k = 0; k < cm.options.gutters.length; ++k) { |
| 975 | var id = cm.options.gutters[k], found = markers.hasOwnProperty(id) && markers[id]; |
| 976 | if (found) |
| 977 | gutterWrap.appendChild(elt("div", [found], "CodeMirror-gutter-elt", "left: " + |
| 978 | dims.gutterLeft[id] + "px; width: " + dims.gutterWidth[id] + "px")); |
| 979 | } |
| 980 | } |
| 981 | } |
| 982 | |
| 983 | function updateLineWidgets(cm, lineView, dims) { |
| 984 | if (lineView.alignable) lineView.alignable = null; |
no test coverage detected