Skip to content

Commit

Permalink
swipe directions
Browse files Browse the repository at this point in the history
  • Loading branch information
thatisuday committed Aug 4, 2016
1 parent 4510a51 commit e222038
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ Turn on/off bubbles.
***

# Touch support
- swipe right and left to change images
- swipe right for prev
- swipe left for next
- doubletap to close gallery

> Touch will be enabled only if `hammer.js` file is added.
Expand Down
4 changes: 2 additions & 2 deletions dist/ng-image-gallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,12 +312,12 @@
// Swipe events
if(window.Hammer){
var hammerElem = new Hammer(elem[0]);
hammerElem.on('swipeleft', function(ev){
hammerElem.on('swiperight', function(ev){
$timeout(function(){
scope.methods.prev();
});
});
hammerElem.on('swiperight', function(ev){
hammerElem.on('swipeleft', function(ev){
$timeout(function(){
scope.methods.next();
});
Expand Down
2 changes: 1 addition & 1 deletion dist/ng-image-gallery.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified dist/ng-image-gallery.min.js.gz
Binary file not shown.
Loading

0 comments on commit e222038

Please sign in to comment.