mirror of
https://github.com/docsifyjs/docsify.git
synced 2026-10-17 04:31:18 +08:00
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user