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

Function onMouseOver

static/editor.md/lib/codemirror/addon/lint/lint.js:175–184  ·  view source on GitHub ↗
(cm, e)

Source from the content-addressed store, hash-verified

173 }
174
175 function onMouseOver(cm, e) {
176 var target = e.target || e.srcElement;
177 if (!/\bCodeMirror-lint-mark-/.test(target.className)) return;
178 var box = target.getBoundingClientRect(), x = (box.left + box.right) / 2, y = (box.top + box.bottom) / 2;
179 var spans = cm.findMarksAt(cm.coordsChar({left: x, top: y}, "client"));
180 for (var i = 0; i < spans.length; ++i) {
181 var ann = spans[i].__annotation;
182 if (ann) return popupSpanTooltip(ann, e);
183 }
184 }
185
186 CodeMirror.defineOption("lint", false, function(cm, val, old) {
187 if (old && old != CodeMirror.Init) {

Callers 1

LintStateFunction · 0.85

Calls 1

popupSpanTooltipFunction · 0.85

Tested by

no test coverage detected