()
| 829 | } |
| 830 | |
| 831 | render() { |
| 832 | const { type, disabled, el, isPaneVisible, inheritedAttributes, side } = this; |
| 833 | const mode = getIonMode(this); |
| 834 | |
| 835 | /** |
| 836 | * If the Close Watcher is enabled then |
| 837 | * the ionBackButton listener in the menu controller |
| 838 | * will handle closing the menu when Escape is pressed. |
| 839 | */ |
| 840 | return ( |
| 841 | <Host |
| 842 | onKeyDown={shouldUseCloseWatcher() ? null : this.onKeydown} |
| 843 | role="navigation" |
| 844 | aria-label={inheritedAttributes['aria-label'] || 'menu'} |
| 845 | class={{ |
| 846 | [mode]: true, |
| 847 | [`menu-type-${type}`]: true, |
| 848 | 'menu-enabled': !disabled, |
| 849 | [`menu-side-${side}`]: true, |
| 850 | 'menu-pane-visible': isPaneVisible, |
| 851 | 'split-pane-side': hostContext('ion-split-pane', el), |
| 852 | }} |
| 853 | > |
| 854 | <div class="menu-inner" part="container" ref={(el) => (this.menuInnerEl = el)}> |
| 855 | <slot></slot> |
| 856 | </div> |
| 857 | |
| 858 | <ion-backdrop |
| 859 | ref={(el) => (this.backdropEl = el)} |
| 860 | class="menu-backdrop" |
| 861 | tappable={false} |
| 862 | stopPropagation={false} |
| 863 | part="backdrop" |
| 864 | /> |
| 865 | </Host> |
| 866 | ); |
| 867 | } |
| 868 | } |
| 869 | |
| 870 | const computeDelta = (deltaX: number, isOpen: boolean, isEndSide: boolean): number => { |
nothing calls this directly
no test coverage detected