| 29 | shadow: true, |
| 30 | }) |
| 31 | export class Nav implements NavOutlet { |
| 32 | private transInstr: TransitionInstruction[] = []; |
| 33 | private sbAni?: Animation; |
| 34 | private gestureOrAnimationInProgress = false; |
| 35 | private useRouter = false; |
| 36 | private isTransitioning = false; |
| 37 | private destroyed = false; |
| 38 | private views: ViewController[] = []; |
| 39 | private gesture?: Gesture; |
| 40 | private didLoad = false; |
| 41 | |
| 42 | @Element() el!: HTMLElement; |
| 43 | |
| 44 | /** @internal */ |
| 45 | @Prop() delegate?: FrameworkDelegate; |
| 46 | |
| 47 | /** |
| 48 | * If the nav component should allow for swipe-to-go-back. |
| 49 | */ |
| 50 | @Prop({ mutable: true }) swipeGesture?: boolean; |
| 51 | @Watch('swipeGesture') |
| 52 | swipeGestureChanged() { |
| 53 | if (this.gesture) { |
| 54 | this.gesture.enable(this.swipeGesture === true); |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | /** |
| 59 | * If `true`, the nav should animate the transition of components. |
| 60 | */ |
| 61 | @Prop() animated = true; |
| 62 | |
| 63 | /** |
| 64 | * By default `ion-nav` animates transition between pages based in the mode (ios or material design). |
| 65 | * However, this property allows to create custom transition using `AnimationBuilder` functions. |
| 66 | */ |
| 67 | @Prop() animation?: AnimationBuilder; |
| 68 | |
| 69 | /** |
| 70 | * Any parameters for the root component |
| 71 | */ |
| 72 | @Prop() rootParams?: ComponentProps; |
| 73 | |
| 74 | /** |
| 75 | * Root NavComponent to load |
| 76 | */ |
| 77 | @Prop() root?: NavComponent; |
| 78 | |
| 79 | @Watch('root') |
| 80 | rootChanged() { |
| 81 | const isDev = Build.isDev; |
| 82 | |
| 83 | if (this.root === undefined) { |
| 84 | return; |
| 85 | } |
| 86 | |
| 87 | if (this.didLoad === false) { |
| 88 | /** |
nothing calls this directly
no outgoing calls
no test coverage detected