(display)
| 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 |
no test coverage detected