[gnome-maps] mapView: Start all the way zoomed out at (0, 0)



commit 6d4b1d757f3bc319c7bf65b97ca8007e65a61720
Author: FlyingPiMonster <flyingpimonster flyingpimonster net>
Date:   Sat Sep 15 16:45:04 2018 -0500

    mapView: Start all the way zoomed out at (0, 0)
    
    This makes the map view show the entire world at startup.
    
    Closes #98

 src/mapView.js | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/mapView.js b/src/mapView.js
index 6316f1f..57ec994 100644
--- a/src/mapView.js
+++ b/src/mapView.js
@@ -178,7 +178,12 @@ var MapView = GObject.registerClass({
 
     _initView() {
         let view = this.get_view();
-        view.zoom_level = 3;
+
+        // Start all the way zoomed out and centered on (0, 0)
+        // This way you can see the whole map on startup
+        view.zoom_level = MapMinZoom;
+        view.center_on(0, 0);
+
         view.min_zoom_level = MapMinZoom;
         view.goto_animation_mode = Clutter.AnimationMode.EASE_IN_OUT_CUBIC;
         view.reactive = true;


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