mirror of
https://github.com/docsifyjs/docsify.git
synced 2025-12-08 19:55:52 +00:00
parent
c2d12ed27f
commit
04bf1ea5f4
@ -18,7 +18,8 @@ function scrollTo(el, offset = 0) {
|
||||
enableScrollEvent = false;
|
||||
scroller = new Tweezer({
|
||||
start: window.pageYOffset,
|
||||
end: el.getBoundingClientRect().top + window.pageYOffset - offset,
|
||||
end:
|
||||
Math.round(el.getBoundingClientRect().top) + window.pageYOffset - offset,
|
||||
duration: 500,
|
||||
})
|
||||
.on('tick', v => window.scrollTo(0, v))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user