cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hermw...@apache.org
Subject [2/2] js commit: Update lib/webos/plugin/webos/compass.js
Date Mon, 05 Nov 2012 23:00:30 GMT
Update lib/webos/plugin/webos/compass.js

reverting code cleanup that broke functionality (Uncaught TypeError: Cannot read property
'magn
eticHeading' of undefined)


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/commit/e7392475
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/e7392475
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/e7392475

Branch: refs/heads/master
Commit: e7392475eaf469280ae61126424adf57842ee440
Parents: a637188
Author: ghtomcat <mleut@yahoo.com>
Authored: Tue Oct 30 10:18:14 2012 +0100
Committer: hermwong <herm.wong@gmail.com>
Committed: Mon Nov 5 14:33:10 2012 -0800

----------------------------------------------------------------------
 lib/webos/plugin/webos/compass.js |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/e7392475/lib/webos/plugin/webos/compass.js
----------------------------------------------------------------------
diff --git a/lib/webos/plugin/webos/compass.js b/lib/webos/plugin/webos/compass.js
index 96a9978..c6f392d 100644
--- a/lib/webos/plugin/webos/compass.js
+++ b/lib/webos/plugin/webos/compass.js
@@ -30,8 +30,9 @@ module.exports = {
         } else {
             console.error("webos plugin compass getheading");
             var onReadingChanged = function (e) {
+                var heading = new CompassHeading(e.magHeading, e.trueHeading);
                 document.removeEventListener("compass", onReadingChanged);
-                win(CompassHeading(e.magHeading, e.trueHeading));
+                win(heading);
             };
             document.addEventListener("compass", onReadingChanged);
         }


Mime
View raw message