From edd0c1ca7495a32930ed1170abaedf2c73234581 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Thu, 13 Nov 2014 08:36:34 +0000 Subject: Smooth scrolling; note incorrect calibration; MUST BE FIXED! --- content_scripts/scroller.coffee | 3 +++ 1 file changed, 3 insertions(+) (limited to 'content_scripts') 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 -- cgit v1.2.3