diff --git a/CHANGELOG.md b/CHANGELOG.md index 412183989a..8004861200 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Added - Launch activity directly from url of CLI +### Changed +- Upgrade to Cordova 12 + ### Fixed - Images go under each other while editing in Fototoon #1552 - Missalignment of icons and text in Fototoon activity "clean all" button #1596 diff --git a/activities/PhysicsJS.activity/js/activity.js b/activities/PhysicsJS.activity/js/activity.js index aabcdaa128..33d43398ca 100644 --- a/activities/PhysicsJS.activity/js/activity.js +++ b/activities/PhysicsJS.activity/js/activity.js @@ -72,7 +72,11 @@ define(["sugar-web/activity/activity","tutorial","l10n","sugar-web/env"], functi zoom(); } if (readyToWatch) { - watchId = navigator.accelerometer.watchAcceleration(accelerationChanged, null, { frequency: 500 }); + var accelerometer = new Accelerometer({ frequency: 500 }); + if (accelerometer) { + accelerometer.addEventListener('reading', accelerationChanged); + accelerometer.start(); + } readyToWatch = false; } }); @@ -183,8 +187,9 @@ define(["sugar-web/activity/activity","tutorial","l10n","sugar-web/env"], functi } }, true); - function accelerationChanged(acceleration) { + function accelerationChanged(accelerationEvent) { if (!sensorMode) return; + var acceleration = accelerationEvent.target; if (acceleration.x < -4.5) { if (acceleration.y > 4.75) setGravity(3); diff --git a/config.xml b/config.xml index e956d3d601..21ed631c02 100644 --- a/config.xml +++ b/config.xml @@ -23,34 +23,12 @@ - - - - - - - - - - - - - - - - - - - - - - - +