[gnome-maps] Zoom in more aggressively



commit dd4975c13396f06117c6ceaafe2efc6033fb09dd
Author: Mattias Bengtsson <mattias jc bengtsson gmail com>
Date:   Tue Dec 29 23:35:48 2015 +0100

    Zoom in more aggressively
    
    Remove some zoom logic that compensated for a too high max zoom level in
    libchamplain. Since we now only go down to zoomlevel 18 this is no
    longer needed.

 src/mapMarker.js |    4 ++--
 src/mapWalker.js |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/mapMarker.js b/src/mapMarker.js
index 92cc4e9..520cda7 100644
--- a/src/mapMarker.js
+++ b/src/mapMarker.js
@@ -70,8 +70,8 @@ const MapMarker = new Lang.Class({
     _onButtonPress: function(marker, event) {
         // Zoom in on marker on double-click
         if (event.get_click_count() > 1) {
-            if (this._view.zoom_level < this._view.max_zoom_level - 1) {
-                this._view.zoom_level = this._view.max_zoom_level - 1;
+            if (this._view.zoom_level < this._view.max_zoom_level) {
+                this._view.zoom_level = this._view.max_zoom_level;
                 this._view.center_on(this.latitude, this.longitude);
             }
         }
diff --git a/src/mapWalker.js b/src/mapWalker.js
index 67a94da..e212705 100644
--- a/src/mapWalker.js
+++ b/src/mapWalker.js
@@ -57,7 +57,7 @@ const MapWalker = new Lang.Class({
     zoomToFit: function() {
         let zoom;
         if (this._boundingBox !== null && this._boundingBox.is_valid()) {
-            this._view.zoom_level = this._view.max_zoom_level - 1;
+            this._view.zoom_level = this._view.max_zoom_level;
             this._view.ensure_visible(this._boundingBox, false);
         } else {
             switch (this.place.place_type) {
@@ -78,7 +78,7 @@ const MapWalker = new Lang.Class({
                 break;
 
             default:
-                zoom = 16;
+                zoom = this._view.max_zoom_level;
                 break;
             }
             this._view.zoom_level = zoom;


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