MCPcopy Create free account
hub / github.com/ronreiter/interactive-tutorials / wrappingChanged

Function wrappingChanged

static/js/codemirror/codemirror.js:204–216  ·  view source on GitHub ↗
(cm)

Source from the content-addressed store, hash-verified

202 }
203
204 function wrappingChanged(cm) {
205 if (cm.options.lineWrapping) {
206 cm.display.wrapper.className += " CodeMirror-wrap";
207 cm.display.sizer.style.minWidth = "";
208 } else {
209 cm.display.wrapper.className = cm.display.wrapper.className.replace(" CodeMirror-wrap", "");
210 computeMaxLength(cm);
211 }
212 estimateLineHeights(cm);
213 regChange(cm);
214 clearCaches(cm);
215 setTimeout(function(){updateScrollbars(cm.display, cm.doc.height);}, 100);
216 }
217
218 function estimateHeight(cm) {
219 var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;

Callers

nothing calls this directly

Calls 5

computeMaxLengthFunction · 0.85
estimateLineHeightsFunction · 0.85
regChangeFunction · 0.85
clearCachesFunction · 0.85
updateScrollbarsFunction · 0.85

Tested by

no test coverage detected