diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-08-27 10:12:12 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-08-27 10:12:12 +0900 |
commit | 02c0cfd97d44c8568dee6f0d11d2e45732309c67 (patch) | |
tree | 3ac86ccfaabaa86acd23a0f46821c6511223db0a /src/content/scrolls.js | |
parent | 6213f55e22f79eb8b7572a619e0fc68047c0631e (diff) |
scroll lines action
Diffstat (limited to 'src/content/scrolls.js')
-rw-r--r-- | src/content/scrolls.js | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/content/scrolls.js b/src/content/scrolls.js index 2a233c2..ef112a4 100644 --- a/src/content/scrolls.js +++ b/src/content/scrolls.js @@ -1,12 +1,6 @@ const SCROLL_DELTA = 48; -const scrollUp = (page, count) => { - let x = page.scrollX; - let y = page.scrollY - SCROLL_DELTA * count; - page.scrollTo(x, y); -}; - -const scrollDown = (page, count) => { +const scrollLines = (page, count) => { let x = page.scrollX; let y = page.scrollY + SCROLL_DELTA * count; page.scrollTo(x, y); @@ -24,4 +18,4 @@ const scrollBottom = (page) => { page.scrollTo(x, y); }; -export { scrollUp, scrollDown, scrollTop, scrollBottom } +export { scrollLines, scrollTop, scrollBottom } |