MCPcopy
hub / github.com/hokein/electron-sample-apps / charWidth

Function charWidth

mini-code-editor/cm/lib/codemirror.js:1663–1667  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1661 }
1662 var cachedWidth, cachedWidthFor = 0;
1663 function charWidth() {
1664 if (scroller.clientWidth == cachedWidthFor) return cachedWidth;
1665 cachedWidthFor = scroller.clientWidth;
1666 return (cachedWidth = stringWidth("x"));
1667 }
1668 function paddingTop() {return lineSpace.offsetTop;}
1669 function paddingLeft() {return lineSpace.offsetLeft;}
1670

Callers 4

updateLinesNoUndoFunction · 0.85
wrappingChangedFunction · 0.85
charFromXFunction · 0.85
coordsCharFunction · 0.85

Calls 1

stringWidthFunction · 0.85

Tested by

no test coverage detected