MCPcopy
hub / github.com/DHTMLX/gantt / ensureLineWrapped

Function ensureLineWrapped

samples/common/codehighlight/codemirror.js:2105–2114  ·  view source on GitHub ↗
(lineView)

Source from the content-addressed store, hash-verified

2103 // Lines with gutter elements, widgets or a background class need to
2104 // be wrapped, and have the extra elements added to the wrapper div
2105 function ensureLineWrapped(lineView) {
2106 if (lineView.node == lineView.text) {
2107 lineView.node = elt("div", null, null, "position: relative");
2108 if (lineView.text.parentNode)
2109 { lineView.text.parentNode.replaceChild(lineView.node, lineView.text); }
2110 lineView.node.appendChild(lineView.text);
2111 if (ie && ie_version < 8) { lineView.node.style.zIndex = 2; }
2112 }
2113 return lineView.node
2114 }
2115
2116 function updateLineBackground(cm, lineView) {
2117 var cls = lineView.bgClass ? lineView.bgClass + " " + (lineView.line.bgClass || "") : lineView.line.bgClass;

Callers 4

updateLineBackgroundFunction · 0.85
updateLineClassesFunction · 0.85
updateLineGutterFunction · 0.85
insertLineWidgetsForFunction · 0.85

Calls 1

eltFunction · 0.85

Tested by

no test coverage detected