diff options
| author | Arjun Roychowdhury <pliablepixels@gmail.com> | 2015-10-31 11:18:54 -0400 |
|---|---|---|
| committer | Arjun Roychowdhury <pliablepixels@gmail.com> | 2015-10-31 11:18:54 -0400 |
| commit | c82f01949574ade6b95eaf1736a24677e2e1bd21 (patch) | |
| tree | 58a55aca4634cf78c5c417389fb76846d5e597d9 /www/external/angular-carousel.js | |
| parent | d0bc0c60e3470a8bb02df22dcdadf31275cd86da (diff) | |
desktop mods - start/stop play of event on mouse click too #59
Diffstat (limited to 'www/external/angular-carousel.js')
| -rw-r--r-- | www/external/angular-carousel.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/www/external/angular-carousel.js b/www/external/angular-carousel.js index 9c7f770a..e0748f1d 100644 --- a/www/external/angular-carousel.js +++ b/www/external/angular-carousel.js @@ -68,15 +68,17 @@ angular.module('angular-carousel') if (attrs.hasOwnProperty('rnCarouselPauseOnHover') && attrs.rnCarouselPauseOnHover !== 'false'){ // PP - added touchend to make it react to touch devices element.on('touchend', toggleAutoPlay); - element.on('mouseenter', stopAutoPlay); - element.on('mouseleave', restartTimer); + element.on('click', toggleAutoPlay); // PP for desktop + //element.on('mouseenter', stopAutoPlay); + //element.on('mouseleave', restartTimer); } scope.$on('$destroy', function(){ stopAutoPlay(); - element.off('mouseenter', stopAutoPlay); - element.off('mouseleave', restartTimer); + //element.off('mouseenter', stopAutoPlay); + //element.off('mouseleave', restartTimer); element.off('touchend', toggleAutoPlay); // PP - remove touchend too + element.off('click', toggleAutoPlay); // PP - remove mouse click for desktop }); } }; |
