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

feat: use side wheel to move conveyer #15

Closed malangfox closed 2 years ago

malangfox commented 2 years ago

Details

Added useSideWheel option to move the Conveyer using the mouse wheel in a direction aside from the scroll direction. If this option is enabled, horizontal Conveyer will be able to move by using vertical mouse wheel. Also vertical Conveyer can be moved using the horizontal mouse wheel.

Behavior for Wheel event with mixed deltaX and deltaY

In some cases, wheel event can have deltaX and deltaY, such as moving the trackpad diagonally. In this case, only the delta in the same direction as the Conveyer's direction will be applied to the move, even if useSideWheel is enabled.