MCPcopy Index your code
hub / github.com/csev/py4e / charWidth

Function charWidth

tools/pythonauto/static/codemirror/codemirror.js:1341–1349  ·  view source on GitHub ↗
(display)

Source from the content-addressed store, hash-verified

1339 }
1340
1341 function charWidth(display) {
1342 if (display.cachedCharWidth != null) return display.cachedCharWidth;
1343 var anchor = elt("span", "x");
1344 var pre = elt("pre", [anchor]);
1345 removeChildrenAndAdd(display.measure, pre);
1346 var width = anchor.offsetWidth;
1347 if (width > 2) display.cachedCharWidth = width;
1348 return width || 10;
1349 }
1350
1351 // OPERATIONS
1352

Callers 2

estimateHeightFunction · 0.70
codemirror.jsFile · 0.70

Calls 2

eltFunction · 0.70
removeChildrenAndAddFunction · 0.70

Tested by

no test coverage detected