@@ -198,6 +198,7 @@ export class Menu extends Ion {
198198 private _isSwipeEnabled : boolean = true ;
199199 private _isPers : boolean = false ;
200200 private _init : boolean = false ;
201+ private _prevEnabled : boolean ;
201202
202203 /**
203204 * @private
@@ -419,10 +420,10 @@ export class Menu extends Ion {
419420 */
420421 swipeStart ( ) {
421422 // user started swiping the menu open/close
422- if ( this . _isPrevented ( ) || ! this . _isEnabled || ! this . _isSwipeEnabled ) return ;
423-
424- this . _before ( ) ;
425- this . _getType ( ) . setProgressStart ( this . isOpen ) ;
423+ if ( this . _isEnabled && this . _isSwipeEnabled && ! this . _isPrevented ( ) ) {
424+ this . _before ( ) ;
425+ this . _getType ( ) . setProgressStart ( this . isOpen ) ;
426+ }
426427 }
427428
428429 /**
@@ -451,9 +452,6 @@ export class Menu extends Ion {
451452 }
452453 }
453454
454- /**
455- * @private
456- */
457455 private _before ( ) {
458456 // this places the menu into the correct location before it animates in
459457 // this css class doesn't actually kick off any animations
@@ -466,9 +464,6 @@ export class Menu extends Ion {
466464 }
467465 }
468466
469- /**
470- * @private
471- */
472467 private _after ( isOpen : boolean ) {
473468 // keep opening/closing the menu disabled for a touch more yet
474469 // only add listeners/css if it's enabled and isOpen
@@ -495,15 +490,24 @@ export class Menu extends Ion {
495490 /**
496491 * @private
497492 */
493+ tempDisable ( temporarilyDisable : boolean ) {
494+ if ( temporarilyDisable ) {
495+ this . _prevEnabled = this . _isEnabled ;
496+ this . _getType ( ) . setProgessStep ( 0 ) ;
497+ this . enable ( false ) ;
498+
499+ } else {
500+ this . enable ( this . _prevEnabled ) ;
501+ this . _after ( false ) ;
502+ }
503+ }
504+
498505 private _prevent ( ) {
499506 // used to prevent unwanted opening/closing after swiping open/close
500507 // or swiping open the menu while pressing down on the MenuToggle
501508 this . _preventTime = Date . now ( ) + 20 ;
502509 }
503510
504- /**
505- * @private
506- */
507511 private _isPrevented ( ) {
508512 return this . _preventTime > Date . now ( ) ;
509513 }
0 commit comments