MCPcopy Index your code
hub / github.com/ronreiter/interactive-tutorials / getDimensions

Function getDimensions

static/js/codemirror/codemirror.js:552–563  ·  view source on GitHub ↗
(cm)

Source from the content-addressed store, hash-verified

550 }
551
552 function getDimensions(cm) {
553 var d = cm.display, left = {}, width = {};
554 for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) {
555 left[cm.options.gutters[i]] = n.offsetLeft;
556 width[cm.options.gutters[i]] = n.offsetWidth;
557 }
558 return {fixedPos: compensateForHScroll(d),
559 gutterTotalWidth: d.gutters.offsetWidth,
560 gutterLeft: left,
561 gutterWidth: width,
562 wrapperWidth: d.wrapper.clientWidth};
563 }
564
565 function patchDisplay(cm, from, to, intact, updateNumbersFrom) {
566 var dims = getDimensions(cm);

Callers 1

patchDisplayFunction · 0.85

Calls 1

compensateForHScrollFunction · 0.85

Tested by

no test coverage detected