MCPcopy
hub / github.com/witheve/Eve / ensureLineWrapped

Function ensureLineWrapped

src/codemirror.js:909–918  ·  view source on GitHub ↗
(lineView)

Source from the content-addressed store, hash-verified

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