File tree 1 file changed +15
-15
lines changed 1 file changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -344,24 +344,24 @@ export class ItemSliding {
344
344
345
345
if ( isFinal ) {
346
346
this . item . setElementStyle ( platform . Css . transition , '' ) ;
347
+ }
347
348
348
- } else {
349
- if ( openAmount > 0 ) {
350
- var state = ( openAmount >= ( this . _optsWidthRightSide + SWIPE_MARGIN ) )
351
- ? SlidingState . Right | SlidingState . SwipeRight
352
- : SlidingState . Right ;
349
+ if ( openAmount > 0 ) {
350
+ var state = ( openAmount >= ( this . _optsWidthRightSide + SWIPE_MARGIN ) )
351
+ ? SlidingState . Right | SlidingState . SwipeRight
352
+ : SlidingState . Right ;
353
+
354
+ this . _setState ( state ) ;
353
355
354
- this . _setState ( state ) ;
356
+ } else if ( openAmount < 0 ) {
357
+ var state = ( openAmount <= ( - this . _optsWidthLeftSide - SWIPE_MARGIN ) )
358
+ ? SlidingState . Left | SlidingState . SwipeLeft
359
+ : SlidingState . Left ;
355
360
356
- } else if ( openAmount < 0 ) {
357
- var state = ( openAmount <= ( - this . _optsWidthLeftSide - SWIPE_MARGIN ) )
358
- ? SlidingState . Left | SlidingState . SwipeLeft
359
- : SlidingState . Left ;
361
+ this . _setState ( state ) ;
360
362
361
- this . _setState ( state ) ;
362
- }
363
- }
364
- if ( openAmount === 0 ) {
363
+ } else {
364
+ assert ( openAmount === 0 , 'bad internal state' ) ;
365
365
this . _tmr = platform . timeout ( ( ) => {
366
366
this . _setState ( SlidingState . Disabled ) ;
367
367
this . _tmr = null ;
@@ -371,7 +371,7 @@ export class ItemSliding {
371
371
}
372
372
373
373
this . item . setElementStyle ( platform . Css . transform , `translate3d(${ - openAmount } px,0,0)` ) ;
374
- let ionDrag = this . ionDrag ;
374
+ const ionDrag = this . ionDrag ;
375
375
if ( ionDrag . observers . length > 0 ) {
376
376
ionDrag . emit ( this ) ;
377
377
}
You can’t perform that action at this time.
0 commit comments