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

Commit

Permalink
fix #315 + bump release
Browse files Browse the repository at this point in the history
  • Loading branch information
revolunet committed Jun 11, 2015
1 parent 04b9f76 commit 12f28ed
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 26 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "angular-carousel",
"description": "Angular Carousel - Mobile friendly touch carousel for AngularJS",
"version": "0.3.11",
"version": "0.3.12",
"homepage": "http://revolunet.github.com/angular-carousel",
"author": "Julien Bouquillon <[email protected]>",
"repository": {
Expand Down
31 changes: 17 additions & 14 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 v0.3.11 - 2015-06-08
* @version v0.3.12 - 2015-06-11
* @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 @@ -294,14 +294,17 @@ angular.module('angular-carousel').run(['$templateCache', function($templateCach
mouseUpBound = false,
locked = false;

$swipe.bind(iElement, {
start: swipeStart,
move: swipeMove,
end: swipeEnd,
cancel: function(event) {
swipeEnd({}, event);
}
});
//rn-swipe-disabled =true will only disable swipe events
if(iAttributes.rnSwipeDisabled !== "true") {
$swipe.bind(iElement, {
start: swipeStart,
move: swipeMove,
end: swipeEnd,
cancel: function(event) {
swipeEnd({}, event);
}
});
}

function getSlidesDOM() {
return iElement[0].querySelectorAll('ul[rn-carousel] > li');
Expand Down Expand Up @@ -455,7 +458,7 @@ angular.module('angular-carousel').run(['$templateCache', function($templateCach
' <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' +
'</div>';
iElement.append($compile(angular.element(tpl))(scope));
iElement.parent().append($compile(angular.element(tpl))(scope));
}

if (iAttributes.rnCarouselAutoSlide!==undefined) {
Expand All @@ -472,7 +475,7 @@ angular.module('angular-carousel').run(['$templateCache', function($templateCach
}, duration * 1000);
};
}

if (iAttributes.rnCarouselDefaultIndex) {
var defaultIndexModel = $parse(iAttributes.rnCarouselDefaultIndex);
options.defaultIndex = defaultIndexModel(scope.$parent) || 0;
Expand Down Expand Up @@ -507,7 +510,7 @@ angular.module('angular-carousel').run(['$templateCache', function($templateCach
}
});
isIndexBound = true;

if (options.defaultIndex) {
goToSlide(options.defaultIndex, {
animate: !init
Expand Down Expand Up @@ -587,7 +590,7 @@ angular.module('angular-carousel').run(['$templateCache', function($templateCach
slidesMove = -scope.carouselIndex;
}
var moveOffset = shouldMove ? slidesMove : 0;

destination = (scope.carouselIndex + moveOffset);

goToSlide(destination);
Expand All @@ -599,7 +602,7 @@ angular.module('angular-carousel').run(['$templateCache', function($templateCach
$parse(iAttributes.rnCarouselOnInfiniteScrollLeft)(scope)
goToSlide(currentSlides.length);
}

} else {
scope.$apply(function() {
scope.carouselIndex = parseInt(-offset / 100, 10);
Expand Down
Loading

0 comments on commit 12f28ed

Please sign in to comment.