MCPcopy Create free account
hub / github.com/TruthHun/BookStack / paddingH

Function paddingH

static/mergely/lib/codemirror.js:2516–2523  ·  view source on GitHub ↗
(display)

Source from the content-addressed store, hash-verified

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

Callers 2

drawSelectionRangeFunction · 0.70
posFromMouseFunction · 0.70

Calls 2

removeChildrenAndAddFunction · 0.70
eltFunction · 0.70

Tested by

no test coverage detected