You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2015/03/06 21:15:05 UTC
[2/2] cordova-plugin-device-orientation git commit: force async
callbacks
force async callbacks
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-orientation/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-orientation/commit/527bb316
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-orientation/tree/527bb316
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-orientation/diff/527bb316
Branch: refs/heads/master
Commit: 527bb316ed5aa95f4d960fb5912e7a812b2f6ff7
Parents: d415703
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Fri Mar 6 12:14:57 2015 -0800
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Fri Mar 6 12:14:57 2015 -0800
----------------------------------------------------------------------
src/windows/CompassProxy.js | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-orientation/blob/527bb316/src/windows/CompassProxy.js
----------------------------------------------------------------------
diff --git a/src/windows/CompassProxy.js b/src/windows/CompassProxy.js
index a9ad68d..a5e055f 100644
--- a/src/windows/CompassProxy.js
+++ b/src/windows/CompassProxy.js
@@ -39,11 +39,15 @@ module.exports = {
} else {
var reading = deviceCompass.getCurrentReading(),
heading = new CompassHeading(reading.headingMagneticNorth, reading.headingTrueNorth, null, reading.timestamp.getTime());
- win(heading);
+ setTimeout(function () {
+ win(heading);
+ }, 0);
}
},
stopHeading: function (win, lose) {
- win();
+ setTimeout(function () {
+ win();
+ }, 0);
}
};
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org