1
1
/**
2
2
* @ngdoc overview
3
3
* @name ui.bootstrap.carousel
4
- *
4
+ *
5
5
* @description
6
6
* AngularJS version of an image carousel.
7
7
*
@@ -32,10 +32,10 @@ angular.module('ui.bootstrap.carousel', ['ui.bootstrap.transition'])
32
32
}
33
33
function goNext ( ) {
34
34
//If we have a slide to transition from and we have a transition type and we're allowed, go
35
- if ( self . currentSlide && angular . isString ( direction ) && ! $scope . noTransition && nextSlide . $element ) {
35
+ if ( self . currentSlide && angular . isString ( direction ) && ! $scope . noTransition && nextSlide . $element ) {
36
36
//We shouldn't do class manip in here, but it's the same weird thing bootstrap does. need to fix sometime
37
37
nextSlide . $element . addClass ( direction ) ;
38
- nextSlide . $element [ 0 ] . offsetWidth = nextSlide . $element [ 0 ] . offsetWidth ; //force reflow
38
+ var reflow = nextSlide . $element [ 0 ] . offsetWidth ; //force reflow
39
39
40
40
//Set all other slides to stop doing their stuff for the new transition
41
41
angular . forEach ( slides , function ( slide ) {
@@ -74,7 +74,7 @@ angular.module('ui.bootstrap.carousel', ['ui.bootstrap.transition'])
74
74
75
75
$scope . next = function ( ) {
76
76
var newIndex = ( currentIndex + 1 ) % slides . length ;
77
-
77
+
78
78
//Prevent this user-triggered transition from occurring if there is already one in progress
79
79
if ( ! $scope . $currentTransition ) {
80
80
return self . select ( slides [ newIndex ] , 'next' ) ;
@@ -83,7 +83,7 @@ angular.module('ui.bootstrap.carousel', ['ui.bootstrap.transition'])
83
83
84
84
$scope . prev = function ( ) {
85
85
var newIndex = currentIndex - 1 < 0 ? slides . length - 1 : currentIndex - 1 ;
86
-
86
+
87
87
//Prevent this user-triggered transition from occurring if there is already one in progress
88
88
if ( ! $scope . $currentTransition ) {
89
89
return self . select ( slides [ newIndex ] , 'prev' ) ;
@@ -300,7 +300,7 @@ function CarouselDemoCtrl($scope) {
300
300
var lastValue = scope . active = getActive ( scope . $parent ) ;
301
301
scope . $watch ( function parentActiveWatch ( ) {
302
302
var parentActive = getActive ( scope . $parent ) ;
303
-
303
+
304
304
if ( parentActive !== scope . active ) {
305
305
// we are out of sync and need to copy
306
306
if ( parentActive !== lastValue ) {
0 commit comments