Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
Use of $.extend was creating a new copy of $.mobile and that's a no-no
Browse files Browse the repository at this point in the history
  • Loading branch information
gseguin committed Jun 26, 2012
1 parent f1e81ef commit 1ec640e
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions js/jquery.mobile.transition.js
Expand Up @@ -135,7 +135,10 @@ var createHandler = function( sequential ){

// generate the handlers from the above
var sequentialHandler = createHandler(),
simultaneousHandler = createHandler( false );
simultaneousHandler = createHandler( false ),
defaultGetMaxScrollForTransition = function() {
return $.mobile.getScreenHeight() * 3;
};

// Make our transition handler the public default.
$.mobile.defaultTransitionHandler = sequentialHandler;
Expand All @@ -149,12 +152,8 @@ $.mobile.transitionHandlers = {

$.mobile.transitionFallbacks = {};

$.mobile = $.extend( {}, {
getMaxScrollForTransition: function() {
return $.mobile.getScreenHeight() * 3;
}
}, $.mobile );

// Set the getMaxScrollForTransition to default if no implementation was set by user
$.mobile.getMaxScrollForTransition = $.mobile.getMaxScrollForTransition || defaultGetMaxScrollForTransition;
})( jQuery, this );
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
});
Expand Down

0 comments on commit 1ec640e

Please sign in to comment.