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

Method changed

lib/web/CodeMirror/src/model/mark_text.js:111–131  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

109 // Signals that the marker's widget changed, and surrounding layout
110 // should be recomputed.
111 changed() {
112 let pos = this.find(-1, true), widget = this, cm = this.doc.cm
113 if (!pos || !cm) return
114 runInOp(cm, () => {
115 let line = pos.line, lineN = lineNo(pos.line)
116 let view = findViewForLine(cm, lineN)
117 if (view) {
118 clearLineMeasurementCacheFor(view)
119 cm.curOp.selectionChanged = cm.curOp.forceUpdate = true
120 }
121 cm.curOp.updateMaxLine = true
122 if (!lineIsHidden(widget.doc, line) && widget.height != null) {
123 let oldHeight = widget.height
124 widget.height = null
125 let dHeight = widgetHeight(widget) - oldHeight
126 if (dHeight)
127 updateLineHeight(line, line.height + dHeight)
128 }
129 signalLater(cm, "markerChanged", cm, this)
130 })
131 }
132
133 attachLine(line) {
134 if (!this.lines.length && this.doc.cm) {

Callers 2

appendRemoteOutputToLineFunction · 0.45
test.jsFile · 0.45

Calls 9

findMethod · 0.95
runInOpFunction · 0.90
lineNoFunction · 0.90
findViewForLineFunction · 0.90
lineIsHiddenFunction · 0.90
widgetHeightFunction · 0.90
updateLineHeightFunction · 0.90
signalLaterFunction · 0.90

Tested by

no test coverage detected