(detail: GestureDetail)
| 555 | } |
| 556 | |
| 557 | private canStart(detail: GestureDetail): boolean { |
| 558 | // Do not allow swipe gesture if a modal is open |
| 559 | const isModalPresented = !!document.querySelector('ion-modal.show-modal'); |
| 560 | if (isModalPresented || !this.canSwipe()) { |
| 561 | return false; |
| 562 | } |
| 563 | if (this._isOpen) { |
| 564 | return true; |
| 565 | } else if (menuController._getOpenSync()) { |
| 566 | return false; |
| 567 | } |
| 568 | return checkEdgeSide(window, detail.currentX, this.isEndSide, this.maxEdgeStart); |
| 569 | } |
| 570 | |
| 571 | private onWillStart(): Promise<void> { |
| 572 | this.beforeAnimation(!this._isOpen, GESTURE); |
no test coverage detected