File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ export class Marquee {
105
105
this . _waitingForItem = false ;
106
106
}
107
107
108
- this . _tick ( ) ;
108
+ this . _tick ( this . _waitingForItem ) ;
109
109
}
110
110
111
111
getRate ( ) {
@@ -192,12 +192,12 @@ export class Marquee {
192
192
this . _windowOffset = 0 ;
193
193
}
194
194
195
- _tick ( ) {
195
+ _tick ( force = false ) {
196
196
this . _boundary . enter ( ( { callbacks } ) => {
197
197
this . _renderTimer && clearTimeout ( this . _renderTimer ) ;
198
198
this . _renderTimer = null ;
199
199
200
- if ( ! this . _items . length && ! this . _pendingItem ) {
200
+ if ( ! force && ! this . _items . length && ! this . _pendingItem ) {
201
201
this . _cleanup ( ) ;
202
202
return ;
203
203
}
@@ -305,7 +305,7 @@ export class Marquee {
305
305
306
306
// add a buffer on the side to make sure that new elements are added before they would actually be on screen
307
307
const buffer = ( renderInterval / 1000 ) * Math . abs ( this . _rate ) ;
308
- let requireNewItem = false ;
308
+ let requireNewItem = this . _waitingForItem ;
309
309
if (
310
310
! this . _waitingForItem &&
311
311
this . _items . length /* there should always be items at this point */
You can’t perform that action at this time.
0 commit comments