Skip to content
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
@gabrielschulhof

Description

@gabrielschulhof

The replacement can be the following:

  1. The page widget gets
    1. An option "transition"

    2. Defaults: $.mobile.page.defaults.transition: { page: "fade", dialog: "pop" }

    3. 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" ];
      }
  2. 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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions