MCPcopy Create free account
hub / github.com/sql-js/sql.js / paddingH

Function paddingH

GUI/codemirror/lib/codemirror.js:1456–1463  ·  view source on GitHub ↗
(display)

Source from the content-addressed store, hash-verified

1454 function paddingTop(display) {return display.lineSpace.offsetTop;}
1455 function paddingVert(display) {return display.mover.offsetHeight - display.lineSpace.offsetHeight;}
1456 function paddingH(display) {
1457 if (display.cachedPaddingH) return display.cachedPaddingH;
1458 var e = removeChildrenAndAdd(display.measure, elt("pre", "x"));
1459 var style = window.getComputedStyle ? window.getComputedStyle(e) : e.currentStyle;
1460 var data = {left: parseInt(style.paddingLeft), right: parseInt(style.paddingRight)};
1461 if (!isNaN(data.left) && !isNaN(data.right)) display.cachedPaddingH = data;
1462 return data;
1463 }
1464
1465 // Ensure the lineView.wrapping.heights array is populated. This is
1466 // an array of bottom offsets for the lines that make up a drawn

Callers 2

drawSelectionRangeFunction · 0.85
posFromMouseFunction · 0.85

Calls 2

removeChildrenAndAddFunction · 0.85
eltFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…