MCPcopy
hub / github.com/tilemill-project/tilemill / paddingH

Function paddingH

assets/js/codemirror.js:2518–2525  ·  view source on GitHub ↗
(display)

Source from the content-addressed store, hash-verified

2516 function paddingTop(display) {return display.lineSpace.offsetTop;}
2517 function paddingVert(display) {return display.mover.offsetHeight - display.lineSpace.offsetHeight;}
2518 function paddingH(display) {
2519 if (display.cachedPaddingH) return display.cachedPaddingH;
2520 var e = removeChildrenAndAdd(display.measure, elt("pre", "x"));
2521 var style = window.getComputedStyle ? window.getComputedStyle(e) : e.currentStyle;
2522 var data = {left: parseInt(style.paddingLeft), right: parseInt(style.paddingRight)};
2523 if (!isNaN(data.left) && !isNaN(data.right)) display.cachedPaddingH = data;
2524 return data;
2525 }
2526
2527 function scrollGap(cm) { return scrollerGap - cm.display.nativeBarWidth; }
2528 function displayWidth(cm) {

Callers 2

drawSelectionRangeFunction · 0.85
posFromMouseFunction · 0.85

Calls 2

removeChildrenAndAddFunction · 0.85
eltFunction · 0.85

Tested by

no test coverage detected