Signed-off-by: Liu, Xin <xinx.liu@intel.com>
<li id="y">Y:</li>
<li id="z">Z:</li>
</ul>
- <p>X, Y, Z are always changing</p>
+ <p>X, Y, Z will be changed while moving the device, otherwise they will be zero</p>
</div>
</div>
<div data-role="footer" data-position="fixed">
"devicemotion",
function(evt) {
var coordinate = evt.acceleration;
- jQuery("#x").text("X: " + coordinate.x);
- jQuery("#y").text("Y: " + coordinate.y);
- jQuery("#z").text("Z: " + coordinate.z);
+ jQuery("#x").text("X: " + Math.round(coordinate.x-0));
+ jQuery("#y").text("Y: " + Math.round(coordinate.y-0));
+ jQuery("#z").text("Z: " + Math.round(coordinate.z-0));
}, false);