Fix scroll event end value

Fixes #1383
This commit is contained in:
John Hildenbiddle 2020-10-02 14:20:57 -05:00
parent c2d12ed27f
commit 04bf1ea5f4

View File

@ -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))