This repository was archived by the owner on Oct 8, 2021. It is now read-only.
This repository was archived by the owner on Oct 8, 2021. It is now read-only.
Deprecate $.mobile.defaultPageTransition and $.mobile.defaultDialogTransition #6613
Open
Description
The replacement can be the following:
- The page widget gets
-
An option "transition"
-
Defaults: $.mobile.page.defaults.transition: { page: "fade", dialog: "pop" }
-
A method getTransition():
getTransition: function() { // the value of the transition option has highest precedence return this.options.transition || // Otherwise use the value stored in the defaults for the widget $.mobile.page.defaults.transition[ this.options.dialog ? "dialog" : "page" ] || // Finally, for backwards compatibility with 1.4, consult the deprecated values $.mobile[ "default" + ( this.options.dialog ? "Dialog" : "Page" ) + "Transition" ]; }
-
- When the pagecontainer decides which transition to use for the page it's about to bring in, it first consults the transition specified on the link and, if that is undefined, then it grabs the transition to use by calling
toPage.page( "getTransition" )
This way, we retain the dialog-gets-pop-page-gets-fade setup and the default configuration options modifiable at mobileinit time.