(e, content)
| 13 | var GUTTER_ID = "CodeMirror-lint-markers"; |
| 14 | |
| 15 | function showTooltip(e, content) { |
| 16 | var tt = document.createElement("div"); |
| 17 | tt.className = "CodeMirror-lint-tooltip"; |
| 18 | tt.appendChild(content.cloneNode(true)); |
| 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; |
| 29 | return tt; |
| 30 | } |
| 31 | function rm(elt) { |
| 32 | if (elt.parentNode) elt.parentNode.removeChild(elt); |
| 33 | } |
no test coverage detected