CB-8083 Fix accelerometer callback on Windows
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/commit/596258c8 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/tree/596258c8 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/diff/596258c8 Branch: refs/heads/master Commit: 596258c8878491f4457f4bf36d058abdbe514462 Parents: 2fe2227 Author: sgrebnov <[email protected]> Authored: Wed Nov 26 20:56:58 2014 +0300 Committer: sgrebnov <[email protected]> Committed: Wed Nov 26 20:56:58 2014 +0300 ---------------------------------------------------------------------- src/windows/AccelerometerProxy.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/blob/596258c8/src/windows/AccelerometerProxy.js ---------------------------------------------------------------------- diff --git a/src/windows/AccelerometerProxy.js b/src/windows/AccelerometerProxy.js index 0b41ba7..d65764b 100644 --- a/src/windows/AccelerometerProxy.js +++ b/src/windows/AccelerometerProxy.js @@ -42,13 +42,13 @@ module.exports = { // store our bound function this.onDataChanged = function(e) { var a = e.reading; - win(new Acceleration(a.accelerationX,a.accelerationY,a.accelerationZ)); + win(new Acceleration(a.accelerationX, a.accelerationY, a.accelerationZ), {keepCallback: true}); }; accel.addEventListener("readingchanged",this.onDataChanged); setTimeout(function(){ var a = accel.getCurrentReading(); - win(new Acceleration(a.accelerationX,a.accelerationY,a.accelerationZ)); + win(new Acceleration(a.accelerationX, a.accelerationY, a.accelerationZ), {keepCallback: true}); },0); // async do later } }, --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
