[gnome-maps] Do not animate on 'what is here?'



commit 99dce394e7ad37fb735f3422f047ad7dec85038a
Author: Jonas Danielsson <jonas threetimestwo org>
Date:   Sun Aug 16 00:22:13 2015 +0200

    Do not animate on 'what is here?'

 src/contextMenu.js      |    2 +-
 src/favoritesPopover.js |    2 +-
 src/mainWindow.js       |    2 +-
 src/mapView.js          |    4 ++--
 src/mapWalker.js        |    6 ++----
 5 files changed, 7 insertions(+), 9 deletions(-)
---
diff --git a/src/contextMenu.js b/src/contextMenu.js
index 6e8f3b5..1739e6c 100644
--- a/src/contextMenu.js
+++ b/src/contextMenu.js
@@ -67,7 +67,7 @@ const ContextMenu = new Lang.Class({
                                                accuracy: 0 });
 
         Application.geocodeService.reverse(location, null, (function(place) {
-            this._mapView.showSearchResult(place);
+            this._mapView.showSearchResult(place, false);
         }).bind(this));
     },
 });
diff --git a/src/favoritesPopover.js b/src/favoritesPopover.js
index b6d5650..7a04e21 100644
--- a/src/favoritesPopover.js
+++ b/src/favoritesPopover.js
@@ -84,7 +84,7 @@ const FavoritesPopover = new Lang.Class({
 
         this._list.connect('row-activated', (function(list, row) {
             this.hide();
-            this._mapView.showSearchResult(row.place);
+            this._mapView.showSearchResult(row.place, true);
         }).bind(this));
 
         this._list.set_filter_func((function(row) {
diff --git a/src/mainWindow.js b/src/mainWindow.js
index 09c3e44..f2f8011 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -109,7 +109,7 @@ const MainWindow = new Lang.Class({
                                                    });
         placeEntry.connect('notify::place', (function() {
             if (placeEntry.place) {
-                this._mapView.showSearchResult(placeEntry.place);
+                this._mapView.showSearchResult(placeEntry.place, true);
             }
         }).bind(this));
 
diff --git a/src/mapView.js b/src/mapView.js
index 9718255..f5f3a3c 100644
--- a/src/mapView.js
+++ b/src/mapView.js
@@ -237,14 +237,14 @@ const MapView = new Lang.Class({
         this._gotoBBox(contact.bounding_box);
     },
 
-    showSearchResult: function(place) {
+    showSearchResult: function(place, animation) {
         this._placeLayer.remove_all();
         this.routeVisible = false;
         let placeMarker = new PlaceMarker.PlaceMarker({ place: place,
                                                         mapView: this });
 
         this._placeLayer.add_marker(placeMarker);
-        placeMarker.goToAndSelect(true);
+        placeMarker.goToAndSelect(animation);
 
         return placeMarker;
     },
diff --git a/src/mapWalker.js b/src/mapWalker.js
index 8dc824e..301ff70 100644
--- a/src/mapWalker.js
+++ b/src/mapWalker.js
@@ -93,11 +93,9 @@ const MapWalker = new Lang.Class({
         this._mapView.emit('going-to');
 
         if (!animate) {
-            this._view.animate_zoom = false;
-            this.zoomToFit();
-            this._view.animate_zoom = true;
+            this._view.center_on(this.place.location.latitude,
+                                 this.place.location.longitude);
             this.emit('gone-to');
-
             return;
         }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]