aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Blott2014-11-13 08:36:34 +0000
committerStephen Blott2014-11-13 08:36:34 +0000
commitedd0c1ca7495a32930ed1170abaedf2c73234581 (patch)
tree854e805a291608e40d2ea3d4cc930919f6461213
parente9130eb61b7d3742a80e899c0f1afcc23ad7b5ce (diff)
downloadvimium-edd0c1ca7495a32930ed1170abaedf2c73234581.tar.bz2
Smooth scrolling; note incorrect calibration; MUST BE FIXED!
-rw-r--r--content_scripts/scroller.coffee3
1 files changed, 3 insertions, 0 deletions
diff --git a/content_scripts/scroller.coffee b/content_scripts/scroller.coffee
index 8ce87253..07dc9f11 100644
--- a/content_scripts/scroller.coffee
+++ b/content_scripts/scroller.coffee
@@ -139,6 +139,9 @@ doScrollBy = do ->
animate = (timestamp) ->
start ?= timestamp
+ # FIXME(smblott) This calculation is not correctly calibrated:
+ # - A `j` with smooth scrolling does not take you to the same place as a `j` with jump scrolling.
+ # - A `j` followed by `k` does not take you back to exactly where you started.
progress = timestamp - start
scrollDelta = roundOut(delta * progress) - scrolledAmount
scrolledAmount += scrollDelta