[SensorBall]update SensorBall(tizen_2.1)
[samples/web/SensorBall.git] / js / main.js
index d607ee2..5920d79 100644 (file)
@@ -471,8 +471,7 @@ $(document).ready(function () {
                contentHeight = screen.availHeight - $('div[data-role="header"]').outerHeight() - $('div[data-role="footer"]').outerHeight();
 
        $('div[data-role="content"]').css('height', contentHeight - 33);
-       app.gameWidth = window.innerWidth;
-
+       app.gameWidth = screen.availWidth;
        app.ballWidth = parseInt($('.ball').css('width'), 10);
        app.ballHeight = parseInt($('.ball').css('height'), 10);
 
@@ -509,6 +508,6 @@ $(document).ready(function () {
 });
 
 $(window).resize(function() {
-       app.gameWidth = $(window).width();
+       app.gameWidth = screen.availWidth;
        app.gameHeight = $('.background').outerHeight();
 });