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

Function endOperation_R2

static/mergely/lib/codemirror.js:3080–3099  ·  view source on GitHub ↗
(op)

Source from the content-addressed store, hash-verified

3078 }
3079
3080 function endOperation_R2(op) {
3081 var cm = op.cm, display = cm.display;
3082 if (op.updatedDisplay) updateHeightsInViewport(cm);
3083
3084 op.barMeasure = measureForScrollbars(cm);
3085
3086 // If the max line changed since it was last measured, measure it,
3087 // and ensure the document's width matches it.
3088 // updateDisplay_W2 will use these properties to do the actual resizing
3089 if (display.maxLineChanged && !cm.options.lineWrapping) {
3090 op.adjustWidthTo = measureChar(cm, display.maxLine, display.maxLine.text.length).left + 3;
3091 cm.display.sizerWidth = op.adjustWidthTo;
3092 op.barMeasure.scrollWidth =
3093 Math.max(display.scroller.clientWidth, display.sizer.offsetLeft + op.adjustWidthTo + scrollGap(cm) + cm.display.barWidth);
3094 op.maxScrollLeft = Math.max(0, display.sizer.offsetLeft + op.adjustWidthTo - displayWidth(cm));
3095 }
3096
3097 if (op.updatedDisplay || op.selectionChanged)
3098 op.preparedSelection = display.input.prepareSelection();
3099 }
3100
3101 function endOperation_W2(op) {
3102 var cm = op.cm;

Callers 1

endOperationsFunction · 0.70

Calls 5

updateHeightsInViewportFunction · 0.70
measureForScrollbarsFunction · 0.70
measureCharFunction · 0.70
scrollGapFunction · 0.70
displayWidthFunction · 0.70

Tested by

no test coverage detected