(display)
| 1126 | } |
| 1127 | |
| 1128 | function charWidth(display) { |
| 1129 | if (display.cachedCharWidth != null) return display.cachedCharWidth; |
| 1130 | var anchor = elt("span", "x"); |
| 1131 | var pre = elt("pre", [anchor]); |
| 1132 | removeChildrenAndAdd(display.measure, pre); |
| 1133 | var width = anchor.offsetWidth; |
| 1134 | if (width > 2) display.cachedCharWidth = width; |
| 1135 | return width || 10; |
| 1136 | } |
| 1137 | |
| 1138 | // OPERATIONS |
| 1139 |
no test coverage detected
searching dependent graphs…