MCPcopy Create free account
hub / github.com/TruthHun/BookStack / wrappingChanged

Function wrappingChanged

static/editor.md/lib/codemirror/lib/codemirror.js:248–261  ·  view source on GitHub ↗
(cm)

Source from the content-addressed store, hash-verified

246 }
247
248 function wrappingChanged(cm) {
249 if (cm.options.lineWrapping) {
250 addClass(cm.display.wrapper, "CodeMirror-wrap");
251 cm.display.sizer.style.minWidth = "";
252 cm.display.sizerWidth = null;
253 } else {
254 rmClass(cm.display.wrapper, "CodeMirror-wrap");
255 findMaxLine(cm);
256 }
257 estimateLineHeights(cm);
258 regChange(cm);
259 clearCaches(cm);
260 setTimeout(function(){updateScrollbars(cm);}, 100);
261 }
262
263 // Returns a function that estimates the height of a line, to use as
264 // first approximation until the line becomes visible (and is thus

Callers

nothing calls this directly

Calls 6

findMaxLineFunction · 0.70
estimateLineHeightsFunction · 0.70
regChangeFunction · 0.70
clearCachesFunction · 0.70
updateScrollbarsFunction · 0.70
addClassFunction · 0.50

Tested by

no test coverage detected