diff options
author | Sheogorath | 2019-05-31 00:27:56 +0200 |
---|---|---|
committer | Sheogorath | 2019-05-31 00:30:29 +0200 |
commit | 4da68597f701376307fe8849ed57edd3a80833ed (patch) | |
tree | fb50db25c63b3b2cb70426ba3eab42007be60134 /public/js/lib/syncscroll.js | |
parent | 3eca0a74ae3d87a42acb7c7b8e39e2c389e3c96c (diff) |
Fix eslint warnings
Since we are about to release it's time to finally fix our linting. This
patch basically runs eslint --fix and does some further manual fixes.
Also it sets up eslint to fail on every warning on order to make
warnings visable in the CI process.
There should no functional change be introduced.
Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
Diffstat (limited to 'public/js/lib/syncscroll.js')
-rw-r--r-- | public/js/lib/syncscroll.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/public/js/lib/syncscroll.js b/public/js/lib/syncscroll.js index cee317ea..d492fbc9 100644 --- a/public/js/lib/syncscroll.js +++ b/public/js/lib/syncscroll.js @@ -188,7 +188,7 @@ function buildMapInner (callback) { } nonEmptyList.push(0) - // make the first line go top + // make the first line go top _scrollMap[0] = viewTop const parts = markdownArea.find('.part').toArray() @@ -336,7 +336,7 @@ export function syncScrollToView (event, preventAnimate) { const scrollInfo = editor.getScrollInfo() const textHeight = editor.defaultTextHeight() lineNo = Math.floor(scrollInfo.top / textHeight) - // if reach the last line, will start lerp to the bottom + // if reach the last line, will start lerp to the bottom const diffToBottom = (scrollInfo.top + scrollInfo.clientHeight) - (scrollInfo.height - textHeight) if (scrollInfo.height > scrollInfo.clientHeight && diffToBottom > 0) { topDiffPercent = diffToBottom / textHeight |