MCPcopy
hub / github.com/csev/py4e / ensureLineWrapped

Function ensureLineWrapped

tools/pythonauto/static/codemirrorepl/codemirror.js:768–777  ·  view source on GitHub ↗
(lineView)

Source from the content-addressed store, hash-verified

766 // Lines with gutter elements, widgets or a background class need to
767 // be wrapped, and have the extra elements added to the wrapper div
768 function ensureLineWrapped(lineView) {
769 if (lineView.node == lineView.text) {
770 lineView.node = elt("div", null, null, "position: relative");
771 if (lineView.text.parentNode)
772 lineView.text.parentNode.replaceChild(lineView.node, lineView.text);
773 lineView.node.appendChild(lineView.text);
774 if (ie_upto7) lineView.node.style.zIndex = 2;
775 }
776 return lineView.node;
777 }
778
779 function updateLineBackground(lineView) {
780 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 2

eltFunction · 0.70
appendChildMethod · 0.45

Tested by

no test coverage detected