diff options
author | Struan Donald <struan@exo.org.uk> | 2013-04-22 15:07:49 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2013-04-22 15:58:17 +0100 |
commit | ed17181e0660ce6452b9fbc4a8a6d1a807dca453 (patch) | |
tree | 108ab08558d5226d97c3e22dacf0057d7e2af5ce | |
parent | fa8938228b0784f2c07233cc336a3ab3014c63a7 (diff) |
standardise on currentPosition
-rw-r--r-- | www/js/app.js | 1 | ||||
-rw-r--r-- | www/js/views/around.js | 6 | ||||
-rw-r--r-- | www/js/views/search.js | 4 |
3 files changed, 5 insertions, 6 deletions
diff --git a/www/js/app.js b/www/js/app.js index ebaf671..2ce05e2 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -45,7 +45,6 @@ var tpl = { initialized: 0, users: new FMS.Users(), currentUser: null, - currentLocation: null, currentPosition: null, currentDraft: new FMS.Draft(), diff --git a/www/js/views/around.js b/www/js/views/around.js index 759de9f..b9b7fc7 100644 --- a/www/js/views/around.js +++ b/www/js/views/around.js @@ -17,9 +17,9 @@ afterDisplay: function() { if ( FMS.isOffline ) { this.navigate( 'offline' ); - } else if ( FMS.currentLocation ) { - var info = { coordinates: FMS.currentLocation }; - FMS.currentLocation = null; + } else if ( FMS.currentPosition ) { + var info = { coordinates: FMS.currentPosition }; + FMS.currentPosition = null; this.gotLocation(info); } else if ( this.model && this.model.get('lat') ) { var modelInfo = { coordinates: { latitude: this.model.get('lat'), longitude: this.model.get('lon') } }; diff --git a/www/js/views/search.js b/www/js/views/search.js index fad5bd5..41c8031 100644 --- a/www/js/views/search.js +++ b/www/js/views/search.js @@ -30,7 +30,7 @@ searchSuccess: function( info ) { this.stopListening(FMS.locator); var coords = info.coordinates; - FMS.currentLocation = coords; + FMS.currentPosition = coords; this.navigate('around'); }, @@ -39,7 +39,7 @@ var lat = t.attr('data-lat'); var long = t.attr('data-long'); - FMS.currentLocation = { latitude: lat, longitude: long }; + FMS.currentPosition = { latitude: lat, longitude: long }; this.navigate('around'); }, |