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: add useWheel option #14

Closed malangfox closed 2 years ago

malangfox commented 2 years ago

Details

Added useWheel to ConveyerOptions. The default value is true. useWheel decides whether to use the mouse wheel input for same scroll direction.

If direction is horizontal and useWheel is true, the mouse wheel can move the Conveyer horizontally. If direction is horizontal and useWheel is false, the Conveyer moves only by drag as same as before.

If direction is vertical and useWheel is true, the Conveyer moves by drag and mouse wheel as same as before. If direction is vertical and useWheel is false, the Conveyer moves only by drag.

If you want to use it as the same Conveyer as before, set useWheel to true for vertical and false for horizontal.

malangfox commented 2 years ago

The current implementation is whether or not to use the vertical mouse wheel for scrolling the conveyor. But it is considered more appropriate to support option like "Whether to use the wheel input in a direction different from that of the conveyor".

And for that implementation, it need to handle horizontal mouse wheel in WheelInput of Axes. Will close the PR until Axes supports that feature.