Skip to content

Conversation

t-f-m
Copy link

@t-f-m t-f-m commented Sep 26, 2018

Add feature(gallery):
jquery.detect_swipe.js and hammer also support swipeup and swipedown.

Add feature(gallery):
  jquery.detect_swipe.js and hammer also support swipeup and swipedown.
.on('swipeleft', self._swipeleft = function() { self.$instance.trigger('next'); })
.on('swiperight', self._swiperight = function() { self.$instance.trigger('previous'); });
.on('swiperight', self._swiperight = function() { self.$instance.trigger('previous'); })
.on('swipeup', self._swipeup = function() { $.featherlight.close(event); })
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be function(event) { ... }, right?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right. this is my mistake.

@marcandre
Copy link
Collaborator

Sounds like a a great idea.
I'm just wondering if there should be a setting to avoid the behavior though. I'm thinking of featherlights to show those long and ridiculous User Agreements and stuff that might need to scroll up/down. If I'm not mistaken, listening for swipeup/down will disable the scrolling.

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.

2 participants