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

Function showTooltipFor

static/editor.md/lib/codemirror/addon/lint/lint.js:41–56  ·  view source on GitHub ↗
(e, content, node)

Source from the content-addressed store, hash-verified

39 }
40
41 function showTooltipFor(e, content, node) {
42 var tooltip = showTooltip(e, content);
43 function hide() {
44 CodeMirror.off(node, "mouseout", hide);
45 if (tooltip) { hideTooltip(tooltip); tooltip = null; }
46 }
47 var poll = setInterval(function() {
48 if (tooltip) for (var n = node;; n = n.parentNode) {
49 if (n && n.nodeType == 11) n = n.host;
50 if (n == document.body) return;
51 if (!n) { hide(); break; }
52 }
53 if (!tooltip) return clearInterval(poll);
54 }, 400);
55 CodeMirror.on(node, "mouseout", hide);
56 }
57
58 function LintState(cm, options, hasGutter) {
59 this.marked = [];

Callers 2

makeMarkerFunction · 0.85
popupSpanTooltipFunction · 0.85

Calls 2

showTooltipFunction · 0.85
hideFunction · 0.70

Tested by

no test coverage detected