You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by mm...@apache.org on 2014/05/05 18:09:15 UTC

[15/49] git commit: fixed the scope

fixed the scope


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/2043d2e3
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/tree/2043d2e3
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/diff/2043d2e3

Branch: refs/heads/cdvtest
Commit: 2043d2e3fecf06acfedd9096eebafa96d2162f3f
Parents: 4d202c1
Author: Piotr Zalewa <pi...@zalewa.info>
Authored: Thu Oct 24 18:23:44 2013 +0200
Committer: Piotr Zalewa <pi...@zalewa.info>
Committed: Thu Oct 24 18:23:44 2013 +0200

----------------------------------------------------------------------
 src/firefoxos/accelerometer.js | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/blob/2043d2e3/src/firefoxos/accelerometer.js
----------------------------------------------------------------------
diff --git a/src/firefoxos/accelerometer.js b/src/firefoxos/accelerometer.js
index b01f77c..025b6c8 100644
--- a/src/firefoxos/accelerometer.js
+++ b/src/firefoxos/accelerometer.js
@@ -1,11 +1,11 @@
-
-function listener function(ev) {
-    var acc = ev.accelerationIncludingGravity;
-    acc.timestamp = new Date().getTime();
-    success(acc);
-}
+var listener;
 var Accelerometer = {
     start: function start(success, error) {
+        listener = function(ev) {
+            var acc = ev.accelerationIncludingGravity;
+            acc.timestamp = new Date().getTime();
+            success(acc);
+        }
         return window.addEventListener('devicemotion', listener, false);
     },