@@ -5,7 +5,7 @@ angular.module('ui.bootstrap.carousel', [])
5
5
slides = self . slides = $scope . slides = [ ] ,
6
6
SLIDE_DIRECTION = 'uib-slideDirection' ,
7
7
currentIndex = $scope . active ,
8
- currentInterval , isPlaying , bufferedTransitions = [ ] ;
8
+ currentInterval , isPlaying ;
9
9
10
10
var destroyed = false ;
11
11
$element . addClass ( 'carousel' ) ;
@@ -67,11 +67,6 @@ angular.module('ui.bootstrap.carousel', [])
67
67
self . removeSlide = function ( slide ) {
68
68
var index = findSlideIndex ( slide ) ;
69
69
70
- var bufferedIndex = bufferedTransitions . indexOf ( slides [ index ] ) ;
71
- if ( bufferedIndex !== - 1 ) {
72
- bufferedTransitions . splice ( bufferedIndex , 1 ) ;
73
- }
74
-
75
70
//get the index of the slide inside the carousel
76
71
slides . splice ( index , 1 ) ;
77
72
if ( slides . length > 0 && currentIndex === index ) {
@@ -95,7 +90,6 @@ angular.module('ui.bootstrap.carousel', [])
95
90
if ( slides . length === 0 ) {
96
91
currentIndex = null ;
97
92
$scope . active = null ;
98
- clearBufferedTransitions ( ) ;
99
93
}
100
94
} ;
101
95
@@ -110,8 +104,6 @@ angular.module('ui.bootstrap.carousel', [])
110
104
if ( nextSlide . slide . index !== currentIndex &&
111
105
! $scope . $currentTransition ) {
112
106
goNext ( nextSlide . slide , nextIndex , direction ) ;
113
- } else if ( nextSlide && nextSlide . slide . index !== currentIndex && $scope . $currentTransition ) {
114
- bufferedTransitions . push ( slides [ nextIndex ] ) ;
115
107
}
116
108
} ;
117
109
@@ -180,12 +172,6 @@ angular.module('ui.bootstrap.carousel', [])
180
172
}
181
173
} ) ;
182
174
183
- function clearBufferedTransitions ( ) {
184
- while ( bufferedTransitions . length ) {
185
- bufferedTransitions . shift ( ) ;
186
- }
187
- }
188
-
189
175
function getSlideByIndex ( index ) {
190
176
for ( var i = 0 , l = slides . length ; i < l ; ++ i ) {
191
177
if ( slides [ i ] . index === index ) {
@@ -221,14 +207,6 @@ angular.module('ui.bootstrap.carousel', [])
221
207
if ( phase === 'close' ) {
222
208
$scope . $currentTransition = null ;
223
209
$animate . off ( 'addClass' , element ) ;
224
- if ( bufferedTransitions . length ) {
225
- var nextSlide = bufferedTransitions . pop ( ) . slide ;
226
- var nextIndex = nextSlide . index ;
227
- var nextDirection = nextIndex > self . getCurrentIndex ( ) ? 'next' : 'prev' ;
228
- clearBufferedTransitions ( ) ;
229
-
230
- goNext ( nextSlide , nextIndex , nextDirection ) ;
231
- }
232
210
}
233
211
} ) ;
234
212
}
@@ -259,7 +237,6 @@ angular.module('ui.bootstrap.carousel', [])
259
237
function resetTransition ( slides ) {
260
238
if ( ! slides . length ) {
261
239
$scope . $currentTransition = null ;
262
- clearBufferedTransitions ( ) ;
263
240
}
264
241
}
265
242
0 commit comments