[gnome-maps] MapLocation: Re-add easing on goTo



commit 85b4fc69a6d1d95b4fef8ad94463f76c5c033958
Author: Mattias Bengtsson <mattias jc bengtsson gmail com>
Date:   Thu Jan 16 16:55:22 2014 +0100

    MapLocation: Re-add easing on goTo
    
    This patch re-adds easing on mapLocation.goTo for a much smoother
    transition.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=722350

 src/mapLocation.js |    3 +++
 src/mapView.js     |    2 +-
 2 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/mapLocation.js b/src/mapLocation.js
index 16a0cc5..631f05d 100644
--- a/src/mapLocation.js
+++ b/src/mapLocation.js
@@ -67,12 +67,15 @@ const MapLocation = new Lang.Class({
          * location.
          */
 
+        this._view.goto_animation_mode = Clutter.AnimationMode.EASE_IN_CUBIC;
         Utils.once(this._view, "animation-completed", (function() {
             Utils.once(this._view, "animation-completed::go-to", (function() {
                 this.zoomToFit();
+                this._view.goto_animation_mode = Clutter.AnimationMode.EASE_IN_OUT_CUBIC;
                 this.emit('gone-to');
             }).bind(this));
 
+            this._view.goto_animation_mode = Clutter.AnimationMode.EASE_OUT_CUBIC;
             this._view.go_to(this.latitude, this.longitude);
         }).bind(this));
 
diff --git a/src/mapView.js b/src/mapView.js
index d4e7da3..8d38aeb 100644
--- a/src/mapView.js
+++ b/src/mapView.js
@@ -63,7 +63,7 @@ const MapView = new Lang.Class({
         this.view = this.actor;
         this.view.set_zoom_level(3);
         this.view.min_zoom_level = MapMinZoom;
-        this.view.goto_animation_mode = Clutter.AnimationMode.LINEAR;
+        this._view.goto_animation_mode = Clutter.AnimationMode.EASE_IN_OUT_CUBIC;
         this.view.set_reactive(true);
 
         this.view.connect('notify::latitude', this._onViewMoved.bind(this));


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