Skip to content

Conversation

@derdritte
Copy link

To let mouse-wheel events change the current picture to the previous or next picture:

baguetteBox.run('.gallery', {
    'handleWheel': true
});

Default is false, that seemed appropriate to me.

The current implementation prevents default and, to avoid having to restructure when (user)options are loaded, the event-handler is always added to the overlay and the event-handler will check the option on each event. Naturally this is not ideal, but didn't think adding this small feature warranted that level of refactoring. I am not a JS-dev, any input is appreciated.

An (additional) option to allow inverting of the directions the scroll-events get translated to can be added easily, if desired.
I also read the contribution guidelines, but opening a ticket for such a minimal change seemed overkill, if the feature isn't welcome or relevant, the PR can be closed. If you want the discussion anyway, I'd be happy to open an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant