From 29829ac1ce379965c1d7243089e0b158f794a14f Mon Sep 17 00:00:00 2001 From: Thibaut Courouble Date: Sun, 26 Jun 2016 18:37:53 -0400 Subject: [PATCH] Speed up smooth scrolling a bit --- assets/javascripts/lib/util.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/javascripts/lib/util.coffee b/assets/javascripts/lib/util.coffee index e5b177a6..df3bfde2 100644 --- a/assets/javascripts/lib/util.coffee +++ b/assets/javascripts/lib/util.coffee @@ -234,13 +234,13 @@ $.smoothScroll = (el, end) -> if smoothScroll newDistance = smoothEnd - smoothStart - smoothDuration += Math.min 400, Math.abs(smoothDistance - newDistance) + smoothDuration += Math.min 300, Math.abs(smoothDistance - newDistance) smoothDistance = newDistance return smoothStart = el.scrollTop smoothDistance = smoothEnd - smoothStart - smoothDuration = Math.min 400, Math.abs(smoothDistance) + smoothDuration = Math.min 300, Math.abs(smoothDistance) startTime = Date.now() smoothScroll = ->