MCPcopy Create free account
hub / github.com/sql-js/sql.js / ensureLineWrapped

Function ensureLineWrapped

GUI/codemirror/lib/codemirror.js:783–792  ·  view source on GitHub ↗
(lineView)

Source from the content-addressed store, hash-verified

781 // Lines with gutter elements, widgets or a background class need to
782 // be wrapped, and have the extra elements added to the wrapper div
783 function ensureLineWrapped(lineView) {
784 if (lineView.node == lineView.text) {
785 lineView.node = elt("div", null, null, "position: relative");
786 if (lineView.text.parentNode)
787 lineView.text.parentNode.replaceChild(lineView.node, lineView.text);
788 lineView.node.appendChild(lineView.text);
789 if (ie_upto7) lineView.node.style.zIndex = 2;
790 }
791 return lineView.node;
792 }
793
794 function updateLineBackground(lineView) {
795 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

Used in the wild real call sites across dependent graphs

searching dependent graphs…