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

Function measureForScrollbars

samples/common/codehighlight/codemirror.js:3583–3597  ·  view source on GitHub ↗
(cm)

Source from the content-addressed store, hash-verified

3581 // Prepare DOM reads needed to update the scrollbars. Done in one
3582 // shot to minimize update/measure roundtrips.
3583 function measureForScrollbars(cm) {
3584 var d = cm.display, gutterW = d.gutters.offsetWidth;
3585 var docH = Math.round(cm.doc.height + paddingVert(cm.display));
3586 return {
3587 clientHeight: d.scroller.clientHeight,
3588 viewHeight: d.wrapper.clientHeight,
3589 scrollWidth: d.scroller.scrollWidth, clientWidth: d.scroller.clientWidth,
3590 viewWidth: d.wrapper.clientWidth,
3591 barLeft: cm.options.fixedGutter ? gutterW : 0,
3592 docHeight: docH,
3593 scrollHeight: docH + scrollGap(cm) + d.barHeight,
3594 nativeBarWidth: d.nativeBarWidth,
3595 gutterWidth: gutterW
3596 }
3597 }
3598
3599 var NativeScrollbars = function(place, scroll, cm) {
3600 this.cm = cm;

Callers 4

updateScrollbarsFunction · 0.85
endOperation_R2Function · 0.85
postUpdateDisplayFunction · 0.85
updateDisplaySimpleFunction · 0.85

Calls 2

paddingVertFunction · 0.85
scrollGapFunction · 0.85

Tested by

no test coverage detected