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

Commit

Permalink
chore: update build
Browse files Browse the repository at this point in the history
  • Loading branch information
revolunet committed Jan 21, 2014
1 parent 9d53957 commit e1a4517
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 17 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,16 @@ angular.module('MyApp', ['angular-carousel']);
- `rn-carousel-index` two way binding to control the carousel position.
- `rn-carousel-indicator` to turn on the indicator, see demo page.
- `rn-carousel-buffered` to buffer the carousel, good to minimize the DOM. (works only with arrays)
- `rn-carousel-swipe` boolean value to enable/disable swiping (default true)

## Todo :
- see the [TODO file](./TODO)

## Contributing
- Please follow [AngularJS GIT conventions](https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#)
- Please add tests
- Please update the README and demo (index.html)

## Inspirations
- https://github.com/ajoslin/angular-mobile-nav
- http://mobile.smashingmagazine.com/2012/06/21/play-with-hardware-accelerated-css/
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"author": "revolunet",
"name": "angular-rn-carousel",
"description": "Mobile friendly AngularJS carousel",
"version": "0.1.4",
"version": "0.1.5",
"homepage": "https://github.com/revolunet/angular-carousel",
"repository": {
"type": "git",
Expand Down
32 changes: 19 additions & 13 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.1.3 - 2014-01-08
* @version v0.1.5 - 2014-01-21
* @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 @@ -92,11 +92,6 @@ angular.module('angular-carousel')
}
return true;
});
if (!isRepeatBased) {
// basic template based carousel
var liChilds = tElement.children();
slidesCount = tElement.children().length;
}

return function(scope, iElement, iAttributes, containerCtrl) {

Expand All @@ -109,6 +104,7 @@ angular.module('angular-carousel')
amplitude,
offset = 0,
destination,
slidesCount = 0,
// javascript based animation easing
timestamp;

Expand Down Expand Up @@ -169,11 +165,13 @@ angular.module('angular-carousel')
goToSlide(scope.carouselIndex);
});
} else {
slidesCount = iElement.children().length;
updateIndicatorArray();
updateContainerWidth();
}

function updateIndicatorArray() {
// generate an arrat to be used by the indicators
// generate an array to be used by the indicators
var items = [];
for (var i = 0; i < slidesCount; i++) items[i] = i;
scope.carouselIndicatorArray = items;
Expand Down Expand Up @@ -365,12 +363,20 @@ angular.module('angular-carousel')
return false;
}

$swipe.bind(carousel, {
start: swipeStart,
move: swipeMove,
end: swipeEnd,
cancel: function(event) {
swipeEnd({}, event);
iAttributes.$observe('rnCarouselSwipe', function(newValue, oldValue) {
// only bind swipe when it's not switched off
if(newValue !== 'false' && newValue !== 'off') {
$swipe.bind(carousel, {
start: swipeStart,
move: swipeMove,
end: swipeEnd,
cancel: function(event) {
swipeEnd({}, event);
}
});
} else {
// unbind swipe when it's switched off
carousel.unbind();
}
});

Expand Down
4 changes: 2 additions & 2 deletions dist/angular-carousel.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.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.1.4",
"version": "0.1.5",
"homepage": "http://revolunet.github.com/angular-carousel",
"author": "Julien Bouquillon <[email protected]>",
"repository": {
Expand Down

0 comments on commit e1a4517

Please sign in to comment.