(display)
| 1198 | } |
| 1199 | |
| 1200 | function charWidth(display) { |
| 1201 | if (display.cachedCharWidth != null) return display.cachedCharWidth; |
| 1202 | var anchor = elt("span", "x"); |
| 1203 | var pre = elt("pre", [anchor]); |
| 1204 | removeChildrenAndAdd(display.measure, pre); |
| 1205 | var width = anchor.offsetWidth; |
| 1206 | if (width > 2) display.cachedCharWidth = width; |
| 1207 | return width || 10; |
| 1208 | } |
| 1209 | |
| 1210 | // OPERATIONS |
| 1211 |
no test coverage detected