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

Commit

Permalink
bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
revolunet committed Jun 8, 2015
1 parent d2a7fe9 commit d7c1bc9
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 10 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.10",
"version": "0.3.11",
"homepage": "http://revolunet.github.com/angular-carousel",
"author": "Julien Bouquillon <julien@revolunet.com>",
"repository": {
Expand Down
23 changes: 17 additions & 6 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.10 - 2015-04-16
* @version v0.3.11 - 2015-06-08
* @link http://revolunet.github.com/angular-carousel
* @author Julien Bouquillon <julien@revolunet.com>
* @license MIT License, http://www.opensource.org/licenses/MIT
Expand Down Expand Up @@ -271,7 +271,8 @@ angular.module('angular-carousel').run(['$templateCache', function($templateCach
autoSlideDuration: 3,
bufferSize: 5,
/* in container % how much we need to drag to trigger the slide change */
moveTreshold: 0.1
moveTreshold: 0.1,
defaultIndex: 0
};

// TODO
Expand All @@ -293,15 +294,14 @@ angular.module('angular-carousel').run(['$templateCache', function($templateCach
mouseUpBound = false,
locked = false;

if(iAttributes.rnSwipeDisabled !== "true") { //rn-swipe-disabled =true will only disable swipe events
$swipe.bind(iElement, {
$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 @@ -472,6 +472,11 @@ angular.module('angular-carousel').run(['$templateCache', function($templateCach
}, duration * 1000);
};
}

if (iAttributes.rnCarouselDefaultIndex) {
var defaultIndexModel = $parse(iAttributes.rnCarouselDefaultIndex);
options.defaultIndex = defaultIndexModel(scope.$parent) || 0;
}

if (iAttributes.rnCarouselIndex) {
var updateParentIndex = function(value) {
Expand Down Expand Up @@ -502,14 +507,20 @@ angular.module('angular-carousel').run(['$templateCache', function($templateCach
}
});
isIndexBound = true;

if (options.defaultIndex) {
goToSlide(options.defaultIndex, {
animate: !init
});
}
} else if (!isNaN(iAttributes.rnCarouselIndex)) {
/* if user just set an initial number, set it */
goToSlide(parseInt(iAttributes.rnCarouselIndex, 10), {
animate: false
});
}
} else {
goToSlide(0, {
goToSlide(options.defaultIndex, {
animate: !init
});
init = false;
Expand Down
Loading

0 comments on commit d7c1bc9

Please sign in to comment.