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

Add slide direction option #384

Open
wants to merge 1 commit 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: 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.

13 changes: 10 additions & 3 deletions 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 v1.0.1 - 2015-11-16
* @version v1.0.1 - 2015-12-19
* @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 @@ -343,7 +343,9 @@ angular.module('angular-carousel').run(['$templateCache', function($templateCach
if (index < 0) {
index = currentSlides.length - 1;
}
goToSlide(index, slideOptions);
if (!locked) {
goToSlide(index, slideOptions);
}
};

function goToSlide(index, slideOptions) {
Expand Down Expand Up @@ -443,6 +445,7 @@ angular.module('angular-carousel').run(['$templateCache', function($templateCach
}

var init = true;

scope.carouselIndex = 0;

if (!isRepeatBased) {
Expand Down Expand Up @@ -473,7 +476,11 @@ angular.module('angular-carousel').run(['$templateCache', function($templateCach
}
scope.autoSlider = $interval(function() {
if (!locked && !pressed) {
scope.nextSlide();
if (iAttributes.rnCarouselRtl) {
scope.prevSlide();
} else {
scope.nextSlide();
}
}
}, duration * 1000);
};
Expand Down
Loading