MCPcopy Create free account
hub / github.com/breck7/scroll / paddingH

Function paddingH

external/.scrollLibs.js:3556–3567  ·  view source on GitHub ↗
(display)

Source from the content-addressed store, hash-verified

3554 return display.mover.offsetHeight - display.lineSpace.offsetHeight
3555 }
3556 function paddingH(display) {
3557 if (display.cachedPaddingH) {
3558 return display.cachedPaddingH
3559 }
3560 var e = removeChildrenAndAdd(display.measure, elt("pre", "x"))
3561 var style = window.getComputedStyle ? window.getComputedStyle(e) : e.currentStyle
3562 var data = { left: parseInt(style.paddingLeft), right: parseInt(style.paddingRight) }
3563 if (!isNaN(data.left) && !isNaN(data.right)) {
3564 display.cachedPaddingH = data
3565 }
3566 return data
3567 }
3568
3569 function scrollGap(cm) {
3570 return scrollerGap - cm.display.nativeBarWidth

Callers 2

posFromMouseFunction · 0.85
drawSelectionRangeFunction · 0.85

Calls 2

removeChildrenAndAddFunction · 0.85
eltFunction · 0.85

Tested by

no test coverage detected