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

Commit 12f28ed

Browse files
committed
fix #315 + bump release
1 parent 04b9f76 commit 12f28ed

File tree

5 files changed

+32
-26
lines changed

5 files changed

+32
-26
lines changed

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "angular-carousel",
33
"description": "Angular Carousel - Mobile friendly touch carousel for AngularJS",
4-
"version": "0.3.11",
4+
"version": "0.3.12",
55
"homepage": "http://revolunet.github.com/angular-carousel",
66
"author": "Julien Bouquillon <[email protected]>",
77
"repository": {

dist/angular-carousel.js

+17-14
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* Angular Carousel - Mobile friendly touch carousel for AngularJS
3-
* @version v0.3.11 - 2015-06-08
3+
* @version v0.3.12 - 2015-06-11
44
* @link http://revolunet.github.com/angular-carousel
55
* @author Julien Bouquillon <[email protected]>
66
* @license MIT License, http://www.opensource.org/licenses/MIT
@@ -294,14 +294,17 @@ angular.module('angular-carousel').run(['$templateCache', function($templateCach
294294
mouseUpBound = false,
295295
locked = false;
296296

297-
$swipe.bind(iElement, {
298-
start: swipeStart,
299-
move: swipeMove,
300-
end: swipeEnd,
301-
cancel: function(event) {
302-
swipeEnd({}, event);
303-
}
304-
});
297+
//rn-swipe-disabled =true will only disable swipe events
298+
if(iAttributes.rnSwipeDisabled !== "true") {
299+
$swipe.bind(iElement, {
300+
start: swipeStart,
301+
move: swipeMove,
302+
end: swipeEnd,
303+
cancel: function(event) {
304+
swipeEnd({}, event);
305+
}
306+
});
307+
}
305308

306309
function getSlidesDOM() {
307310
return iElement[0].querySelectorAll('ul[rn-carousel] > li');
@@ -455,7 +458,7 @@ angular.module('angular-carousel').run(['$templateCache', function($templateCach
455458
' <span class="rn-carousel-control rn-carousel-control-prev" ng-click="prevSlide()" ng-if="carouselIndex > 0"></span>\n' +
456459
' <span class="rn-carousel-control rn-carousel-control-next" ng-click="nextSlide()" ng-if="carouselIndex < ' + nextSlideIndexCompareValue + '"></span>\n' +
457460
'</div>';
458-
iElement.append($compile(angular.element(tpl))(scope));
461+
iElement.parent().append($compile(angular.element(tpl))(scope));
459462
}
460463

461464
if (iAttributes.rnCarouselAutoSlide!==undefined) {
@@ -472,7 +475,7 @@ angular.module('angular-carousel').run(['$templateCache', function($templateCach
472475
}, duration * 1000);
473476
};
474477
}
475-
478+
476479
if (iAttributes.rnCarouselDefaultIndex) {
477480
var defaultIndexModel = $parse(iAttributes.rnCarouselDefaultIndex);
478481
options.defaultIndex = defaultIndexModel(scope.$parent) || 0;
@@ -507,7 +510,7 @@ angular.module('angular-carousel').run(['$templateCache', function($templateCach
507510
}
508511
});
509512
isIndexBound = true;
510-
513+
511514
if (options.defaultIndex) {
512515
goToSlide(options.defaultIndex, {
513516
animate: !init
@@ -587,7 +590,7 @@ angular.module('angular-carousel').run(['$templateCache', function($templateCach
587590
slidesMove = -scope.carouselIndex;
588591
}
589592
var moveOffset = shouldMove ? slidesMove : 0;
590-
593+
591594
destination = (scope.carouselIndex + moveOffset);
592595

593596
goToSlide(destination);
@@ -599,7 +602,7 @@ angular.module('angular-carousel').run(['$templateCache', function($templateCach
599602
$parse(iAttributes.rnCarouselOnInfiniteScrollLeft)(scope)
600603
goToSlide(currentSlides.length);
601604
}
602-
605+
603606
} else {
604607
scope.$apply(function() {
605608
scope.carouselIndex = parseInt(-offset / 100, 10);

0 commit comments

Comments
 (0)