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

Function wrappingChanged

static/mergely/lib/codemirror.js:254–267  ·  view source on GitHub ↗
(cm)

Source from the content-addressed store, hash-verified

252 }
253
254 function wrappingChanged(cm) {
255 if (cm.options.lineWrapping) {
256 addClass(cm.display.wrapper, "CodeMirror-wrap");
257 cm.display.sizer.style.minWidth = "";
258 cm.display.sizerWidth = null;
259 } else {
260 rmClass(cm.display.wrapper, "CodeMirror-wrap");
261 findMaxLine(cm);
262 }
263 estimateLineHeights(cm);
264 regChange(cm);
265 clearCaches(cm);
266 setTimeout(function(){updateScrollbars(cm);}, 100);
267 }
268
269 // Returns a function that estimates the height of a line, to use as
270 // 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