MCPcopy Create free account
hub / github.com/ionic-team/ionic-framework / transitionFinish

Method transitionFinish

core/src/components/nav/nav.tsx:925–947  ·  view source on GitHub ↗
(
    hasCompleted: boolean,
    enteringView: ViewController,
    leavingView: ViewController | undefined,
    opts: NavOptions
  )

Source from the content-addressed store, hash-verified

923 }
924
925 private transitionFinish(
926 hasCompleted: boolean,
927 enteringView: ViewController,
928 leavingView: ViewController | undefined,
929 opts: NavOptions
930 ): NavResult {
931 /**
932 * If the transition did not complete, the leavingView will still be the active
933 * view on the stack. Otherwise unmount all the views after the enteringView.
934 */
935 const activeView = hasCompleted ? enteringView : leavingView;
936 if (activeView) {
937 this.unmountInactiveViews(activeView);
938 }
939
940 return {
941 hasCompleted,
942 requiresTransition: true,
943 enteringView,
944 leavingView,
945 direction: opts.direction,
946 };
947 }
948
949 /**
950 * Inserts a view at the specified index.

Callers 1

transitionMethod · 0.95

Calls 1

unmountInactiveViewsMethod · 0.95

Tested by

no test coverage detected