Pagelayout : modify innerHeight dpr calculation in non scrollview mode
authorJinhyuk Jun <jinhyuk.jun@samsung.com>
Wed, 3 Apr 2013 10:45:08 +0000 (19:45 +0900)
committerYoumin Ha <youmin.ha@samsung.com>
Fri, 5 Apr 2013 07:33:13 +0000 (16:33 +0900)
Change-Id: Ia68f9a13e03e00d51ef54c4bdab4e3c0b3f53380

src/js/widgets/jquery.mobile.tizen.pagelayout.js

index b70c01b..da9dcf1 100644 (file)
@@ -282,9 +282,16 @@ define( [ '../jquery.mobile.tizen.core' ], function ( ) {
                                $elHeader = $elPage.find( ":jqmData(role='header')" ),
                                $elFooter = $elPage.find( ":jqmData(role='footer')" ),
                                $elContent = $elPage.find( ":jqmData(role='content')" ),
-                               resultMinHeight;
+                               resultMinHeight,
+                               dpr = 1,
+                               layoutInnerHeight = window.innerHeight;
 
-                       resultMinHeight = window.innerHeight - $elHeader.height() - $elFooter.height();
+                        if ( !$.support.scrollview ) {
+                                dpr = window.outerWidth / window.innerWidth;
+                                layoutInnerHeight = Math.floor( window.outerHeight / dpr );
+                        }
+
+                       resultMinHeight = layoutInnerHeight - $elHeader.height() - $elFooter.height();
 
                        $elContent.css( "min-height", resultMinHeight - parseFloat( $elContent.css("padding-top") ) - parseFloat( $elContent.css("padding-bottom") ) + "px" );
                },
@@ -330,7 +337,9 @@ define( [ '../jquery.mobile.tizen.core' ], function ( ) {
                                $elContent = $elPage.find( ":jqmData(role='content')" ),
                                resultContentHeight = 0,
                                resultFooterHeight = 0,
-                               resultHeaderHeight = 0;
+                               resultHeaderHeight = 0,
+                               layoutInnerHeight = window.innerHeight,
+                               dpr = 1;
 
                        if ( $elPage.length ) {
                                $elFooter = $elPage.find( ":jqmData(role='footer')" );
@@ -346,7 +355,12 @@ define( [ '../jquery.mobile.tizen.core' ], function ( ) {
                                $elFooter.css( "bottom", 0 );
                        }
 
-                       resultContentHeight = window.innerHeight - resultFooterHeight - resultHeaderHeight;
+                       if ( !$.support.scrollview ) {
+                               dpr = window.outerWidth / window.innerWidth;
+                               layoutInnerHeight = Math.floor( window.outerHeight / dpr );
+                       }
+
+                       resultContentHeight = layoutInnerHeight - resultFooterHeight - resultHeaderHeight;
 
                        if ( $.support.scrollview ) {
                                $elContent.height( resultContentHeight -