MCPcopy
hub / github.com/csev/py4e / measureForScrollbars

Function measureForScrollbars

tools/pythonauto/static/codemirrorepl/codemirror.js:392–401  ·  view source on GitHub ↗
(cm)

Source from the content-addressed store, hash-verified

390 // Prepare DOM reads needed to update the scrollbars. Done in one
391 // shot to minimize update/measure roundtrips.
392 function measureForScrollbars(cm) {
393 var scroll = cm.display.scroller;
394 return {
395 clientHeight: scroll.clientHeight,
396 barHeight: cm.display.scrollbarV.clientHeight,
397 scrollWidth: scroll.scrollWidth, clientWidth: scroll.clientWidth,
398 barWidth: cm.display.scrollbarH.clientWidth,
399 docHeight: Math.round(cm.doc.height + paddingVert(cm.display))
400 };
401 }
402
403 // Re-synchronize the fake scrollbars with the actual size of the
404 // content.

Callers 2

updateScrollbarsFunction · 0.85
updateDisplayFunction · 0.85

Calls 1

paddingVertFunction · 0.70

Tested by

no test coverage detected