Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
Except as noted, this software is licensed under Flora License, Version 1.
-Please, see the LICENSE file for Flora License terms and conditions.
+Please, see the LICENSE.Flora file for Flora License terms and conditions.
<tizen:privilege name="http://tizen.org/privilege/application.read"/>
<tizen:privilege name="http://tizen.org/privilege/application.launch"/>
<tizen:privilege name="http://tizen.org/privilege/systeminfo"/>
- <tizen:privilege name="http://tizen.org/privilege/tizen"/>
<icon src="icon.png"/>
<name>SensorBall</name>
<tizen:setting screen-orientation="portrait"/>
<div data-role="header" data-position="fixed">
<h1>SensorBall</h1>
</div>
- <div data-role="content" class="background background1">
+ <div data-role="content" class="background background1" data-scroll="none">
<div id="main">
<img id="image1" class="ball" src="./images/ball1.png" />
</div>
</div>
</div>
</body>
-</html>
+</html>
\ No newline at end of file
* limitations under the License.
*/
-/*jslint devel: true */
/*global $: false, tizen: false, navigator: false, app: true*/
var app = {
this.ballX += this.dX;
this.ballY += this.dY;
- // Waht do it when the earth leaves gravitation of the Sun?;
- //if ( Math.abs(ballX) > 1000) { dX = 2; ballX = 0 };
- //if ( Math.abs(ballY) > 1000) { dY = 2; ballY = 0 };
+ // What do it when the earth leaves gravitation of the Sun?;
if (this.ballX > (this.gameWidth + borderTolerance)) { this.ballX = -borderTolerance; this.deceleration(); }
if (this.ballY > (this.gameHeight + borderTolerance)) { this.ballY = -borderTolerance; this.deceleration(); }
if (this.ballX < -borderTolerance) { this.ballX = this.gameWidth + borderTolerance; this.deceleration(); }
startBall: function startBall() {
"use strict";
+
$('.ui-content').removeClass('background1 background2 background3').addClass('background1');
$(':jqmData(role="controlbar")').find('.ui-btn').removeClass('ui-btn-hover-s ui-btn-down-s');
this.gameHeight = $('.background').outerHeight();
"use strict";
var img;
app.gameWidth = window.innerWidth;
- //gameHeight = window.innerHeight - 142;
app.ballWidth = parseInt($('.ball').css('width'), 10);
app.ballHeight = parseInt($('.ball').css('height'), 10);
});
$('#mainPage').live('pageshow', function () {
- console.log('pageshow');
setTimeout(app.startBall.bind(app), 100);
});