[gnome-maps] UserLocation: translate pin and bubble on notify::size



commit 5758d74c19b1c5f8e6631ae01c371d97510c1938
Author: Jussi Kukkonen <jku goto fi>
Date:   Thu Apr 18 13:28:44 2013 +0300

    UserLocation: translate pin and bubble on notify::size
    
    Setting translation on first allocation is not enough as the size may
    change later: Use notify::size instead.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=698282

 src/userLocation.js | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/src/userLocation.js b/src/userLocation.js
index e6b1e69..9efa3fb 100644
--- a/src/userLocation.js
+++ b/src/userLocation.js
@@ -40,9 +40,8 @@ const UserLocation = new Lang.Class({
 
         this._locationMarker = new Champlain.CustomMarker();
         this._locationMarker.set_location(this.latitude, this.longitude);
-        let allocationId = this._locationMarker.connect('notify::allocation', Lang.bind(this,
+        this._locationMarker.connect('notify::size', Lang.bind(this,
             function() {
-                this._locationMarker.disconnect(allocationId);
                 this._locationMarker.set_translation(-(this._locationMarker.get_width() / 2),
                                                      -this._locationMarker.get_height(),
                                                      0);


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