Skip to content
This repository has been archived by the owner on May 10, 2018. It is now read-only.

Swipe functionality for rnCarouselControlsAllowLoop #365

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ angular.module('MyApp', ['angular-carousel']);
- `rn-carousel-easing`: add this attritube to specify a formula for easing, these can be found in the [shifty
library](https://github.com/jeremyckahn/shifty/blob/master/src/shifty.formulas.js) (default=easeIn)
- `rn-carousel-duration`: add this attribute to set the duration of the transition (default=300)
- `rn-carousel-controls-allow-loop`: add this attribute to allow looping through slides from prev/next controls
- `rn-carousel-controls-allow-loop`: add this attribute to allow looping through slides using the prev/next controls or swiping

## Indicators

Expand Down
2 changes: 2 additions & 0 deletions dist/angular-carousel.css

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

5 changes: 4 additions & 1 deletion dist/angular-carousel.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Angular Carousel - Mobile friendly touch carousel for AngularJS
* @version v0.3.13 - 2015-06-15
* @version v0.3.13 - 2015-09-20
* @link http://revolunet.github.com/angular-carousel
* @author Julien Bouquillon <[email protected]>
* @license MIT License, http://www.opensource.org/licenses/MIT
Expand Down Expand Up @@ -593,6 +593,9 @@ angular.module('angular-carousel').run(['$templateCache', function($templateCach
var moveOffset = shouldMove ? slidesMove : 0;

destination = (scope.carouselIndex + moveOffset);
if(angular.isDefined(tAttributes['rnCarouselControlsAllowLoop'])){
destination = moveOffset === 0 ? 0 : destination;
}

goToSlide(destination);
if(iAttributes.rnCarouselOnInfiniteScrollRight!==undefined && slidesMove === 0 && scope.carouselIndex !== 0) {
Expand Down
Loading