MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / ensureLineWrapped

Function ensureLineWrapped

lib/web/CodeMirror/src/display/update_line.js:23–32  ·  view source on GitHub ↗
(lineView)

Source from the content-addressed store, hash-verified

21// Lines with gutter elements, widgets or a background class need to
22// be wrapped, and have the extra elements added to the wrapper div
23function ensureLineWrapped(lineView) {
24 if (lineView.node == lineView.text) {
25 lineView.node = elt("div", null, null, "position: relative")
26 if (lineView.text.parentNode)
27 lineView.text.parentNode.replaceChild(lineView.node, lineView.text)
28 lineView.node.appendChild(lineView.text)
29 if (ie && ie_version < 8) lineView.node.style.zIndex = 2
30 }
31 return lineView.node
32}
33
34function updateLineBackground(cm, lineView) {
35 let cls = lineView.bgClass ? lineView.bgClass + " " + (lineView.line.bgClass || "") : lineView.line.bgClass

Callers 4

updateLineBackgroundFunction · 0.70
updateLineClassesFunction · 0.70
updateLineGutterFunction · 0.70
insertLineWidgetsForFunction · 0.70

Calls 1

eltFunction · 0.90

Tested by

no test coverage detected