MCPcopy Create free account
hub / github.com/TruthHun/BookStack / position

Function position

static/editor.md/lib/codemirror/addon/lint/lint.js:21–25  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

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;

Callers 1

showTooltipFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected