diff options
author | Struan Donald <struan@exo.org.uk> | 2013-06-11 14:28:52 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2013-06-11 14:28:52 +0100 |
commit | a89289c8c9b154d195fa347cca1dbce0e669330a (patch) | |
tree | b7544ed2da70065bbfd7a6bdadeaa90cf30708a0 /www/js | |
parent | 2e5fe2fd4bb4dc66a1d04a12fe996113f04b9264 (diff) |
location of any current report should always take priority when displaying map
Diffstat (limited to 'www/js')
-rw-r--r-- | www/js/views/around.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/www/js/views/around.js b/www/js/views/around.js index 39d58e5..ff37cf9 100644 --- a/www/js/views/around.js +++ b/www/js/views/around.js @@ -41,13 +41,13 @@ afterDisplay: function() { if ( FMS.isOffline ) { this.navigate( 'offline' ); + } else if ( this.model && this.model.get('lat') ) { + var modelInfo = { coordinates: { latitude: this.model.get('lat'), longitude: this.model.get('lon') } }; + this.gotLocation(modelInfo); } 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') } }; - this.gotLocation(modelInfo); } else { this.locate(); } |