summaryrefslogtreecommitdiff
path: root/public/js/lib/syncscroll.js
diff options
context:
space:
mode:
authorSheogorath2019-06-04 16:09:46 +0200
committerGitHub2019-06-04 16:09:46 +0200
commit6462968e84e8d92292dd23764a9e558d7800147d (patch)
tree03ab6b40402c79c766ffa05a0a09118c6987d540 /public/js/lib/syncscroll.js
parentae32a129303fd14b3b2bd2f5b7bb0b0c0c8a7f81 (diff)
parent4da68597f701376307fe8849ed57edd3a80833ed (diff)
Merge pull request #97 from SISheogorath/fix/linting
Fix eslint warnings
Diffstat (limited to 'public/js/lib/syncscroll.js')
-rw-r--r--public/js/lib/syncscroll.js4
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