Update Bespoke navigation plugin to adjust wheel sensitivity #345
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR includes changed for adjustment wheel sensitivity, and stopped using deprecated
event.which
.Resolves #340.
Wheel sensitivity
Based on the feedback in #340, the navigation through mouse wheel has updated to make a threshold of wheel delta for triggering page navigation.
Multi-touch device such as Magic Trackpad and Magic Mouse will tell a wheel event in much high resolution (wheel delta 3) than the common wheel mouse (wheel delta 120). So the wheel event for navigation was emitted sensitively because events were triggered by a slightly move of a finger, especially on the Magic Mouse.
We should follow these requirements:
This PR will change not to trigger the navigation against the wheel event with the delta value that was less than 20.We are trying to detect enough amount of scroll delta to navigate in cross browser. It should be reduced unexpected navigation from a slightly movement of a finger on Magic Mouse, with keeping sensitivity in the trackpad and regular mouse wheel. Especially must react to the wheel event triggered by a single wheel notch at least.marp-cli/src/templates/bespoke/navigation.ts
Lines 60 to 94 in ab551df
For the trackpad user, this change may feel like making insensitive against the scroll/swipe gesture. Welcome the feedback continuously.