From: gs86.lee Date: Tue, 23 Apr 2013 08:48:29 +0000 (+0900) Subject: [SensorBall]update SensorBall X-Git-Tag: 2.1b_release~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e5dc292f5476be5fcaa949863c06ae6d13f99589;p=samples%2Fweb%2FSensorBall.git [SensorBall]update SensorBall Change-Id: I4eff5837cce8f5caaf10aac5cabf62a0e7eeb1e5 --- diff --git a/config.xml b/config.xml index 170458f..11551fe 100644 --- a/config.xml +++ b/config.xml @@ -1,11 +1,16 @@ - - - - + + + + SensorBall - - - - + + + + diff --git a/icon.png b/icon.png index 983c883..33fbb63 100755 Binary files a/icon.png and b/icon.png differ diff --git a/js/main.js b/js/main.js index 77b213b..8106633 100644 --- a/js/main.js +++ b/js/main.js @@ -114,6 +114,7 @@ var app = { $('#sun').css('left', this.sunX + 'px'); $('#sun').css('top', this.sunY + 'px'); + $('#sun').show(); }, /** @@ -435,7 +436,7 @@ var app = { this.current = 'earth'; $('.ball').attr('src', './images/earth.png'); - $('#main').append(''); + $('#main').append(''); this.sunX = (this.gameWidth - parseInt($('#sun').css('width'), 10)) / 2; this.sunY = (this.gameHeight - parseInt($('#sun').css('height'), 10)) / 2; @@ -481,14 +482,17 @@ $(document).ready(function () { }); $('#btnBall').bind('tap', function (event) { + $('#sun').remove(); app.startBall(); }); $('#btnSky').bind('tap', function (event) { + $('#sun').remove(); app.startSky(); }); $('#btnSpace').bind('tap', function (event) { + $('#sun').remove(); app.startSpace(); }); @@ -499,4 +503,9 @@ $(document).ready(function () { // Preload backgrounds; img = $('').hide(); img.attr('src', 'images/background1.png'); +}); + +$(window).resize(function() { + app.gameWidth = $(window).width(); + app.gameHeight = $('.background').outerHeight(); }); \ No newline at end of file