cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject [2/3] cordova-plugin-geolocation git commit: Fixed lint errors.
Date Wed, 28 Oct 2015 00:34:01 GMT
Fixed lint errors.


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/commit/163051aa
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/tree/163051aa
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/diff/163051aa

Branch: refs/heads/master
Commit: 163051aa38547eb09eef65b9f5267db1bc8c375f
Parents: cbdcedf
Author: Jesse MacFadyen <purplecabbage@gmail.com>
Authored: Tue Oct 27 16:51:53 2015 -0700
Committer: Jesse MacFadyen <purplecabbage@gmail.com>
Committed: Tue Oct 27 16:51:53 2015 -0700

----------------------------------------------------------------------
 src/windows/GeolocationProxy.js | 12 ++++++------
 tests/tests.js                  |  6 +++---
 www/geolocation.js              |  4 ++--
 3 files changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/blob/163051aa/src/windows/GeolocationProxy.js
----------------------------------------------------------------------
diff --git a/src/windows/GeolocationProxy.js b/src/windows/GeolocationProxy.js
index b1996c2..f6188bc 100644
--- a/src/windows/GeolocationProxy.js
+++ b/src/windows/GeolocationProxy.js
@@ -21,7 +21,7 @@ var PositionError = require('./PositionError'),
 function ensureLocator() {
     var deferral;
 
-    if (loc == null) {
+    if (!loc) {
         loc = new Windows.Devices.Geolocation.Geolocator();
 
         if (typeof Windows.Devices.Geolocation.Geolocator.requestAccessAsync === 'function')
{
@@ -75,7 +75,7 @@ function createResult(pos) {
         velocity: pos.coordinate.speed,
         altitudeAccuracy: pos.coordinate.altitudeAccuracy,
         timestamp: pos.coordinate.timestamp
-    }
+    };
     
     if (pos.coordinate.point) {
         res.latitude = pos.coordinate.point.position.latitude;
@@ -93,7 +93,7 @@ function createResult(pos) {
 module.exports = {
     getLocation: function (success, fail, args, env) {
         ensureLocator().done(function () {
-            if (loc != null) {
+            if (loc) {
                 var highAccuracy = args[0],
                     maxAge = args[1];
 
@@ -150,8 +150,8 @@ module.exports = {
                         });
                         break;
 
-                    case Windows.Devices.Geolocation.PositionStatus.initializing:
-                    case Windows.Devices.Geolocation.PositionStatus.ready:
+                    // case Windows.Devices.Geolocation.PositionStatus.initializing:
+                    // case Windows.Devices.Geolocation.PositionStatus.ready:
                     default:
                         break;
                 }
@@ -187,7 +187,7 @@ module.exports = {
             delete ids[clientId];
         }
 
-        success && success();
+        success();
     }
 };
 

http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/blob/163051aa/tests/tests.js
----------------------------------------------------------------------
diff --git a/tests/tests.js b/tests/tests.js
index e07caf8..2d32e40 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -311,7 +311,7 @@ exports.defineManualTests = function (contentEl, createActionButton) {
         document.getElementById('speed').innerHTML = p.coords.speed;
         document.getElementById('altitude_accuracy').innerHTML = p.coords.altitudeAccuracy;
         document.getElementById('timestamp').innerHTML = date.toDateString() + " " + date.toTimeString();
-    }
+    };
 
     /******************************************************************************/
 
@@ -388,8 +388,8 @@ exports.defineManualTests = function (contentEl, createActionButton) {
         note = 
             '<h3>Allow use of current location, if prompted</h3>';
 
-    contentEl.innerHTML = values_info + location_div + latitude + longitude + altitude +
accuracy + heading + speed
-        + altitude_accuracy + time + note + actions;
+    contentEl.innerHTML = values_info + location_div + latitude + longitude + altitude +

+        accuracy + heading + speed + altitude_accuracy + time + note + actions;
 
     createActionButton('Get Location', function () {
         getLocation(false);

http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/blob/163051aa/www/geolocation.js
----------------------------------------------------------------------
diff --git a/www/geolocation.js b/www/geolocation.js
index 568c394..6873ce9 100644
--- a/www/geolocation.js
+++ b/www/geolocation.js
@@ -102,7 +102,7 @@ var geolocation = {
                     velocity:p.velocity,
                     altitudeAccuracy:p.altitudeAccuracy
                 },
-                p.timestamp)
+                p.timestamp
             );
             geolocation.lastPosition = pos;
             successCallback(pos);
@@ -184,7 +184,7 @@ var geolocation = {
                     velocity:p.velocity,
                     altitudeAccuracy:p.altitudeAccuracy
                 },
-                p.timestamp);
+                p.timestamp
             );
             geolocation.lastPosition = pos;
             successCallback(pos);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message