Skip to content

Commit

Permalink
Update lint.js
Browse files Browse the repository at this point in the history
Fix build's linting issues
  • Loading branch information
benjaminr-ps committed Jul 19, 2023
1 parent fc6d6e3 commit 346bd2e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions addon/lint/lint.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@
function position(e) {
if (!tt.parentNode) return CodeMirror.off(document, "mousemove", position);
tt.style.top = Math.max(0, e.clientY - tt.offsetHeight - 5) + "px";
var parentView = tt.ownerDocument.defaultView

var parentView = tt.ownerDocument.defaultView;
var leftPos = e.clientX;
if (leftPos + tt.offsetWidth > parentView.innerWidth)
{
leftPos = Math.max(0, leftPos - tt.offsetWidth)
leftPos = Math.max(0, leftPos - tt.offsetWidth);
}
tt.style.left = (leftPos + 5) + "px"
tt.style.left = (leftPos + 5) + "px";
}
CodeMirror.on(document, "mousemove", position);
position(e);
Expand Down

0 comments on commit 346bd2e

Please sign in to comment.