@@ -5,7 +5,7 @@ angular.module('ui.bootstrap.carousel', [])
55 slides = self . slides = $scope . slides = [ ] ,
66 SLIDE_DIRECTION = 'uib-slideDirection' ,
77 currentIndex = $scope . active ,
8- currentInterval , isPlaying , bufferedTransitions = [ ] ;
8+ currentInterval , isPlaying ;
99
1010 var destroyed = false ;
1111 $element . addClass ( 'carousel' ) ;
@@ -67,11 +67,6 @@ angular.module('ui.bootstrap.carousel', [])
6767 self . removeSlide = function ( slide ) {
6868 var index = findSlideIndex ( slide ) ;
6969
70- var bufferedIndex = bufferedTransitions . indexOf ( slides [ index ] ) ;
71- if ( bufferedIndex !== - 1 ) {
72- bufferedTransitions . splice ( bufferedIndex , 1 ) ;
73- }
74-
7570 //get the index of the slide inside the carousel
7671 slides . splice ( index , 1 ) ;
7772 if ( slides . length > 0 && currentIndex === index ) {
@@ -95,7 +90,6 @@ angular.module('ui.bootstrap.carousel', [])
9590 if ( slides . length === 0 ) {
9691 currentIndex = null ;
9792 $scope . active = null ;
98- clearBufferedTransitions ( ) ;
9993 }
10094 } ;
10195
@@ -110,8 +104,6 @@ angular.module('ui.bootstrap.carousel', [])
110104 if ( nextSlide . slide . index !== currentIndex &&
111105 ! $scope . $currentTransition ) {
112106 goNext ( nextSlide . slide , nextIndex , direction ) ;
113- } else if ( nextSlide && nextSlide . slide . index !== currentIndex && $scope . $currentTransition ) {
114- bufferedTransitions . push ( slides [ nextIndex ] ) ;
115107 }
116108 } ;
117109
@@ -180,12 +172,6 @@ angular.module('ui.bootstrap.carousel', [])
180172 }
181173 } ) ;
182174
183- function clearBufferedTransitions ( ) {
184- while ( bufferedTransitions . length ) {
185- bufferedTransitions . shift ( ) ;
186- }
187- }
188-
189175 function getSlideByIndex ( index ) {
190176 for ( var i = 0 , l = slides . length ; i < l ; ++ i ) {
191177 if ( slides [ i ] . index === index ) {
@@ -221,14 +207,6 @@ angular.module('ui.bootstrap.carousel', [])
221207 if ( phase === 'close' ) {
222208 $scope . $currentTransition = null ;
223209 $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- }
232210 }
233211 } ) ;
234212 }
@@ -259,7 +237,6 @@ angular.module('ui.bootstrap.carousel', [])
259237 function resetTransition ( slides ) {
260238 if ( ! slides . length ) {
261239 $scope . $currentTransition = null ;
262- clearBufferedTransitions ( ) ;
263240 }
264241 }
265242
0 commit comments