(e)
| 19 | document.body.appendChild(tt); |
| 20 | |
| 21 | function position(e) { |
| 22 | if (!tt.parentNode) return CodeMirror.off(document, "mousemove", position); |
| 23 | tt.style.top = Math.max(0, e.clientY - tt.offsetHeight - 5) + "px"; |
| 24 | tt.style.left = (e.clientX + 5) + "px"; |
| 25 | } |
| 26 | CodeMirror.on(document, "mousemove", position); |
| 27 | position(e); |
| 28 | if (tt.style.opacity != null) tt.style.opacity = 1; |