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

Function DisplayUpdate

static/editor.md/lib/codemirror/lib/codemirror.js:617–630  ·  view source on GitHub ↗
(cm, viewport, force)

Source from the content-addressed store, hash-verified

615 // DISPLAY DRAWING
616
617 function DisplayUpdate(cm, viewport, force) {
618 var display = cm.display;
619
620 this.viewport = viewport;
621 // Store some values that we'll need later (but don't want to force a relayout for)
622 this.visible = visibleLines(display, cm.doc, viewport);
623 this.editorIsHidden = !display.wrapper.offsetWidth;
624 this.wrapperHeight = display.wrapper.clientHeight;
625 this.wrapperWidth = display.wrapper.clientWidth;
626 this.oldDisplayWidth = displayWidth(cm);
627 this.force = force;
628 this.dims = getDimensions(cm);
629 this.events = [];
630 }
631
632 DisplayUpdate.prototype.signal = function(emitter, type) {
633 if (hasHandler(emitter, type))

Callers

nothing calls this directly

Calls 3

visibleLinesFunction · 0.70
displayWidthFunction · 0.70
getDimensionsFunction · 0.70

Tested by

no test coverage detected