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

Function getDimensions

tools/pythonauto/static/codemirror/codemirror.js:604–615  ·  view source on GitHub ↗
(cm)

Source from the content-addressed store, hash-verified

602 }
603
604 function getDimensions(cm) {
605 var d = cm.display, left = {}, width = {};
606 for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) {
607 left[cm.options.gutters[i]] = n.offsetLeft;
608 width[cm.options.gutters[i]] = n.offsetWidth;
609 }
610 return {fixedPos: compensateForHScroll(d),
611 gutterTotalWidth: d.gutters.offsetWidth,
612 gutterLeft: left,
613 gutterWidth: width,
614 wrapperWidth: d.wrapper.clientWidth};
615 }
616
617 function patchDisplay(cm, from, to, intact, updateNumbersFrom) {
618 var dims = getDimensions(cm);

Callers 1

patchDisplayFunction · 0.70

Calls 1

compensateForHScrollFunction · 0.70

Tested by

no test coverage detected