MCPcopy
hub / github.com/jagenjo/webglstudio.js / ensureLineWrapped

Function ensureLineWrapped

editor/js/extra/codemirror/codemirror.js:908–917  ·  view source on GitHub ↗
(lineView)

Source from the content-addressed store, hash-verified

906 // Lines with gutter elements, widgets or a background class need to
907 // be wrapped, and have the extra elements added to the wrapper div
908 function ensureLineWrapped(lineView) {
909 if (lineView.node == lineView.text) {
910 lineView.node = elt("div", null, null, "position: relative");
911 if (lineView.text.parentNode)
912 lineView.text.parentNode.replaceChild(lineView.node, lineView.text);
913 lineView.node.appendChild(lineView.text);
914 if (ie && ie_version < 8) lineView.node.style.zIndex = 2;
915 }
916 return lineView.node;
917 }
918
919 function updateLineBackground(lineView) {
920 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