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

Change scope.$apply to scope.$digest #402

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/angular-carousel.css.map

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

21 changes: 9 additions & 12 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 v1.0.1 - 2016-03-05
* @version v1.0.1 - 2016-04-06
* @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 @@ -379,14 +379,13 @@ angular.module('angular-carousel').run(['$templateCache', function($templateCach
}
},
finish: function() {
scope.$apply(function() {
scope.carouselIndex = index;
offset = index * -100;
updateBufferIndex();
$timeout(function () {
scope.carouselIndex = index;
offset = index * -100;
updateBufferIndex();
$timeout(function () {
locked = false;
}, 0, false);
});
scope.$digest();
}
});
}
Expand Down Expand Up @@ -610,11 +609,9 @@ angular.module('angular-carousel').run(['$templateCache', function($templateCach
}

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

scope.carouselIndex = parseInt(-offset / 100, 10);
updateBufferIndex();
scope.$digest();
}

}
Expand Down
Loading