Skip to content

Commit 1a1cfae

Browse files
committed
Merge pull request crosswalk-project#130 from chunywang/deviceorientation/xwalk-6446
[demo-express] Update Accelerometer sample based on accelerationIncludingGravity
2 parents 6db0b55 + 6d1b48b commit 1a1cfae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

samples/Accelerometer/js/main.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Authors:
3131
window.addEventListener(
3232
"devicemotion",
3333
function(evt) {
34-
var coordinate = evt.acceleration;
34+
var coordinate = evt.accelerationIncludingGravity;
3535
$("#x").text("X: " + Math.round(coordinate.x-0));
3636
$("#y").text("Y: " + Math.round(coordinate.y-0));
3737
$("#z").text("Z: " + Math.round(coordinate.z-0));

0 commit comments

Comments
 (0)