(str)
| 1742 | } |
| 1743 | |
| 1744 | function stringWidth(str) { |
| 1745 | measure.innerHTML = "<pre><span>x</span></pre>"; |
| 1746 | measure.firstChild.firstChild.firstChild.nodeValue = str; |
| 1747 | return measure.firstChild.firstChild.offsetWidth || 10; |
| 1748 | } |
| 1749 | // These are used to go from pixel positions to character |
| 1750 | // positions, taking varying character widths into account. |
| 1751 | function charFromX(line, x) { |
no outgoing calls
no test coverage detected