Skip to content

Commit

Permalink
fix: distracting and time wasting after importing smoothing scroll
Browse files Browse the repository at this point in the history
Lervarage 'speedAsDuration: true' to ensure each transition only takes 400ms (Extracted from vuejs.org https://github.com/vuejs/vuejs.org/blob/master/themes/vue/source/js/common.js#L367)
  • Loading branch information
ulivz committed Nov 24, 2018
1 parent 6a47d80 commit 58981fb
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ export default {
this.$vuepress.$set('contentMounted', true)

this.$smoothScroll = new SmoothScroll('a[href*="#"]', {
speed: 1000,
speed: 400,
speedAsDuration: true,
easing: 'easeInOutCubic'
})

Expand Down

0 comments on commit 58981fb

Please sign in to comment.