()
| 727 | } |
| 728 | |
| 729 | private initSwipeToClose() { |
| 730 | if (getIonMode(this) !== 'ios') { |
| 731 | return; |
| 732 | } |
| 733 | |
| 734 | const { el } = this; |
| 735 | |
| 736 | // All of the elements needed for the swipe gesture |
| 737 | // should be in the DOM and referenced by now, except |
| 738 | // for the presenting el |
| 739 | const animationBuilder = this.leaveAnimation || config.get('modalLeave', iosLeaveAnimation); |
| 740 | const ani = (this.animation = animationBuilder(el, { |
| 741 | presentingEl: this.presentingElement, |
| 742 | expandToScroll: this.expandToScroll, |
| 743 | })); |
| 744 | |
| 745 | const contentEl = findIonContent(el); |
| 746 | if (!contentEl) { |
| 747 | printIonContentErrorMsg(el); |
| 748 | return; |
| 749 | } |
| 750 | |
| 751 | const statusBarStyle = this.statusBarStyle ?? StatusBarStyle.Default; |
| 752 | |
| 753 | this.gesture = createSwipeToCloseGesture( |
| 754 | el, |
| 755 | ani, |
| 756 | statusBarStyle, |
| 757 | () => this.cardOnDismiss(), |
| 758 | () => this.onDragStart(), |
| 759 | (detail: ModalDragEventDetail) => this.onDragMove(detail), |
| 760 | (detail: ModalDragEventDetail) => this.onDragEnd(detail) |
| 761 | ); |
| 762 | this.gesture.enable(true); |
| 763 | } |
| 764 | |
| 765 | private initSheetGesture() { |
| 766 | const { wrapperEl, initialBreakpoint, backdropBreakpoint } = this; |
no test coverage detected