MCPcopy Index your code
hub / github.com/DHTMLX/gantt / postUpdateDisplay

Function postUpdateDisplay

samples/common/codehighlight/codemirror.js:4146–4176  ·  view source on GitHub ↗
(cm, update)

Source from the content-addressed store, hash-verified

4144 }
4145
4146 function postUpdateDisplay(cm, update) {
4147 var viewport = update.viewport;
4148
4149 for (var first = true;; first = false) {
4150 if (!first || !cm.options.lineWrapping || update.oldDisplayWidth == displayWidth(cm)) {
4151 // Clip forced viewport to actual scrollable area.
4152 if (viewport && viewport.top != null)
4153 { viewport = {top: Math.min(cm.doc.height + paddingVert(cm.display) - displayHeight(cm), viewport.top)}; }
4154 // Updated line heights might result in the drawn area not
4155 // actually covering the viewport. Keep looping until it does.
4156 update.visible = visibleLines(cm.display, cm.doc, viewport);
4157 if (update.visible.from >= cm.display.viewFrom && update.visible.to <= cm.display.viewTo)
4158 { break }
4159 } else if (first) {
4160 update.visible = visibleLines(cm.display, cm.doc, viewport);
4161 }
4162 if (!updateDisplayIfNeeded(cm, update)) { break }
4163 updateHeightsInViewport(cm);
4164 var barMeasure = measureForScrollbars(cm);
4165 updateSelection(cm);
4166 updateScrollbars(cm, barMeasure);
4167 setDocumentHeight(cm, barMeasure);
4168 update.force = false;
4169 }
4170
4171 update.signal(cm, "update", cm);
4172 if (cm.display.viewFrom != cm.display.reportedViewFrom || cm.display.viewTo != cm.display.reportedViewTo) {
4173 update.signal(cm, "viewportChange", cm, cm.display.viewFrom, cm.display.viewTo);
4174 cm.display.reportedViewFrom = cm.display.viewFrom; cm.display.reportedViewTo = cm.display.viewTo;
4175 }
4176 }
4177
4178 function updateDisplaySimple(cm, viewport) {
4179 var update = new DisplayUpdate(cm, viewport);

Callers 2

endOperation_finishFunction · 0.85
updateDisplaySimpleFunction · 0.85

Calls 10

displayWidthFunction · 0.85
paddingVertFunction · 0.85
displayHeightFunction · 0.85
visibleLinesFunction · 0.85
updateDisplayIfNeededFunction · 0.85
updateHeightsInViewportFunction · 0.85
measureForScrollbarsFunction · 0.85
updateSelectionFunction · 0.85
updateScrollbarsFunction · 0.85
setDocumentHeightFunction · 0.85

Tested by

no test coverage detected