summaryrefslogtreecommitdiff
path: root/www/lib/angular-carousel/src/directives
diff options
context:
space:
mode:
authorArjun Roychowdhury <pliablepixels@gmail.com>2015-09-17 12:32:47 -0400
committerArjun Roychowdhury <pliablepixels@gmail.com>2015-09-17 12:32:47 -0400
commit7c385a7877aa4b0163dda6206f656846db2cf039 (patch)
tree0dd09ef3261f0eca43cda22d27ab3a431ad1cd2f /www/lib/angular-carousel/src/directives
parenta0b74399c4f1a7754029e1fd7f4be3b20836404a (diff)
iOS9 fixes (which includes ionic updates to 1.1.0)
Diffstat (limited to 'www/lib/angular-carousel/src/directives')
-rwxr-xr-xwww/lib/angular-carousel/src/directives/rn-carousel.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/www/lib/angular-carousel/src/directives/rn-carousel.js b/www/lib/angular-carousel/src/directives/rn-carousel.js
index 9399643c..c4e1e4ba 100755
--- a/www/lib/angular-carousel/src/directives/rn-carousel.js
+++ b/www/lib/angular-carousel/src/directives/rn-carousel.js
@@ -374,10 +374,11 @@
if (iAttributes.rnCarouselControls!==undefined) {
// dont use a directive for this
+ var canloop = ((isRepeatBased ? scope[repeatCollection.replace('::', '')].length : currentSlides.length) > 1) ? angular.isDefined(tAttributes['rnCarouselControlsAllowLoop']) : false;
var nextSlideIndexCompareValue = isRepeatBased ? repeatCollection.replace('::', '') + '.length - 1' : currentSlides.length - 1;
var tpl = '<div class="rn-carousel-controls">\n' +
- ' <span class="rn-carousel-control rn-carousel-control-prev" ng-click="prevSlide()" ng-if="carouselIndex > 0"></span>\n' +
- ' <span class="rn-carousel-control rn-carousel-control-next" ng-click="nextSlide()" ng-if="carouselIndex < ' + nextSlideIndexCompareValue + '"></span>\n' +
+ ' <span class="rn-carousel-control rn-carousel-control-prev" ng-click="prevSlide()" ng-if="carouselIndex > 0 || ' + canloop + '"></span>\n' +
+ ' <span class="rn-carousel-control rn-carousel-control-next" ng-click="nextSlide()" ng-if="carouselIndex < ' + nextSlideIndexCompareValue + ' || ' + canloop + '"></span>\n' +
'</div>';
iElement.parent().append($compile(angular.element(tpl))(scope));
}