MCPcopy Create free account
hub / github.com/breck7/scroll / ensureLineWrapped

Function ensureLineWrapped

external/.scrollLibs.js:3318–3330  ·  view source on GitHub ↗
(lineView)

Source from the content-addressed store, hash-verified

3316 // Lines with gutter elements, widgets or a background class need to
3317 // be wrapped, and have the extra elements added to the wrapper div
3318 function ensureLineWrapped(lineView) {
3319 if (lineView.node == lineView.text) {
3320 lineView.node = elt("div", null, null, "position: relative")
3321 if (lineView.text.parentNode) {
3322 lineView.text.parentNode.replaceChild(lineView.node, lineView.text)
3323 }
3324 lineView.node.appendChild(lineView.text)
3325 if (ie && ie_version < 8) {
3326 lineView.node.style.zIndex = 2
3327 }
3328 }
3329 return lineView.node
3330 }
3331
3332 function updateLineBackground(cm, lineView) {
3333 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