Skip to content
Browse files

Moved getScreenHeight to core

  • Loading branch information...
1 parent 5ab8acd commit 6c91e5018c957aa8c3fce5f77f42f5a19ee54abf @gseguin gseguin committed Jun 22, 2012
Showing with 9 additions and 10 deletions.
  1. +6 −0 js/jquery.mobile.core.js
  2. +3 −10 js/jquery.mobile.navigation.js
View
6 js/jquery.mobile.core.js
@@ -228,6 +228,12 @@ define( [ "jquery", "text!../version.txt" ], function( $, __version__ ) {
}
return $newSet;
+ },
+
+ getScreenHeight: function(){
+ // Native innerHeight returns more accurate value for this across platforms,
+ // jQuery version is here as a normalized fallback for platforms like Symbian
+ return window.innerHeight || $( window ).height();
}
}, $.mobile );
View
13 js/jquery.mobile.navigation.js
@@ -372,7 +372,9 @@ define( [
documentBase = $base.length ? path.parseUrl( path.makeUrlAbsolute( $base.attr( "href" ), documentUrl.href ) ) : documentUrl,
//cache the comparison once.
- documentBaseDiffers = ( documentUrl.hrefNoHash !== documentBase.hrefNoHash );
+ documentBaseDiffers = ( documentUrl.hrefNoHash !== documentBase.hrefNoHash ),
+
+ getScreenHeight = $.mobile.getScreenHeight;
//base element management, defined depending on dynamic base tag support
var base = $.support.dynamicBaseTag ? {
@@ -533,15 +535,6 @@ define( [
}
//simply set the active page's minimum height to screen height, depending on orientation
- function getScreenHeight(){
- // Native innerHeight returns more accurate value for this across platforms,
- // jQuery version is here as a normalized fallback for platforms like Symbian
- return window.innerHeight || $( window ).height();
- }
-
- $.mobile.getScreenHeight = getScreenHeight;
-
- //simply set the active page's minimum height to screen height, depending on orientation
function resetActivePageHeight(){
var aPage = $( "." + $.mobile.activePageClass ),
aPagePadT = parseFloat( aPage.css( "padding-top" ) ),

0 comments on commit 6c91e50

Please sign in to comment.
Something went wrong with that request. Please try again.