MCPcopy Create free account
hub / github.com/TextGeneratorio/text-generator.io / paddingH

Function paddingH

static/libs/codemirror.js:2369–2376  ·  view source on GitHub ↗
(display)

Source from the content-addressed store, hash-verified

2367function paddingTop(display) {return display.lineSpace.offsetTop}
2368function paddingVert(display) {return display.mover.offsetHeight - display.lineSpace.offsetHeight}
2369function paddingH(display) {
2370 if (display.cachedPaddingH) { return display.cachedPaddingH }
2371 var e = removeChildrenAndAdd(display.measure, elt("pre", "x"));
2372 var style = window.getComputedStyle ? window.getComputedStyle(e) : e.currentStyle;
2373 var data = {left: parseInt(style.paddingLeft), right: parseInt(style.paddingRight)};
2374 if (!isNaN(data.left) && !isNaN(data.right)) { display.cachedPaddingH = data; }
2375 return data
2376}
2377
2378function scrollGap(cm) { return scrollerGap - cm.display.nativeBarWidth }
2379function displayWidth(cm) {

Callers 2

posFromMouseFunction · 0.85
drawSelectionRangeFunction · 0.85

Calls 2

removeChildrenAndAddFunction · 0.85
eltFunction · 0.85

Tested by

no test coverage detected