naver / egjs-conveyer

Conveyer adds Drag gestures to your Native Scroll.
https://naver.github.io/egjs-conveyer/
MIT License
111 stars 8 forks source link

prevent scrollPos to contain decimal #12

Closed henrysha closed 2 years ago

henrysha commented 2 years ago

Issue

Haven't opened a separate issue.

Details

scrollPos sometimes return number with .5 decimal. This causes isReachEnd to always return false even though scroll has reached the end position, since {element}.scrollWidth - {element}.scrollLeft returns offsetWidth + 0.5.

henrysha commented 2 years ago

Closing PR since it seems the issue was happening elsewhere.