MCPcopy Index your code
hub / github.com/DHTMLX/gantt / updateLineBackground

Function updateLineBackground

samples/common/codehighlight/codemirror.js:2116–2127  ·  view source on GitHub ↗
(cm, lineView)

Source from the content-addressed store, hash-verified

2114 }
2115
2116 function updateLineBackground(cm, lineView) {
2117 var cls = lineView.bgClass ? lineView.bgClass + " " + (lineView.line.bgClass || "") : lineView.line.bgClass;
2118 if (cls) { cls += " CodeMirror-linebackground"; }
2119 if (lineView.background) {
2120 if (cls) { lineView.background.className = cls; }
2121 else { lineView.background.parentNode.removeChild(lineView.background); lineView.background = null; }
2122 } else if (cls) {
2123 var wrap = ensureLineWrapped(lineView);
2124 lineView.background = wrap.insertBefore(elt("div", null, cls), wrap.firstChild);
2125 cm.display.input.setUneditable(lineView.background);
2126 }
2127 }
2128
2129 // Wrapper around buildLineContent which will reuse the structure
2130 // in display.externalMeasured when possible.

Callers 1

updateLineClassesFunction · 0.85

Calls 2

ensureLineWrappedFunction · 0.85
eltFunction · 0.85

Tested by

no test coverage detected