mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-16 22:10:25 +00:00
Added a new core option called maxTransitionWidth, which defaults to 1000. Accepts any number or false value. If it's not false, the handler will use a "none" transition when the window width is wider than the specified value. This is useful because transitions get very wonky on wider screens.
This commit is contained in:
parent
a0c67fa026
commit
518e3ce8cd
2 changed files with 5 additions and 1 deletions
|
|
@ -39,6 +39,9 @@ define( [ "jquery.mobile.widget" ], function() {
|
|||
|
||||
// Set default page transition - 'none' for no transitions
|
||||
defaultPageTransition: "fade",
|
||||
|
||||
// Set maximum window width for transitions to apply
|
||||
maxTransitionWidth: 1000,
|
||||
|
||||
// Minimum scroll distance that will be remembered when returning to a page
|
||||
minScrollBack: 250,
|
||||
|
|
|
|||
|
|
@ -13,7 +13,8 @@ function outInTransitionHandler( name, reverse, $to, $from ) {
|
|||
toScroll = active.lastScroll || ( touchOverflow ? 0 : $.mobile.defaultHomeScroll ),
|
||||
screenHeight = $.mobile.getScreenHeight(),
|
||||
viewportClass = "ui-mobile-viewport-transitioning viewport-" + name,
|
||||
none = !$.support.cssTransitions || !name || name === "none",
|
||||
maxTransitionOverride = $.mobile.maxTransitionWidth !== false && $( window ).width() > $.mobile.maxTransitionWidth,
|
||||
none = !$.support.cssTransitions || maxTransitionOverride || !name || name === "none",
|
||||
doneOut = function() {
|
||||
|
||||
if ( $from ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue