(str)
| 1542 | } |
| 1543 | |
| 1544 | function stringWidth(str) { |
| 1545 | measure.innerHTML = "<pre><span>x</span></pre>"; |
| 1546 | measure.firstChild.firstChild.firstChild.nodeValue = str; |
| 1547 | return measure.firstChild.firstChild.offsetWidth || 10; |
| 1548 | } |
| 1549 | // These are used to go from pixel positions to character |
| 1550 | // positions, taking varying character widths into account. |
| 1551 | function charFromX(line, x) { |
no outgoing calls
no test coverage detected