Explorar o código

Speed up smooth scrolling a bit

Thibaut Courouble %!s(int64=9) %!d(string=hai) anos
pai
achega
29829ac1ce
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      assets/javascripts/lib/util.coffee

+ 2 - 2
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 = ->