[gnome-maps] MapView: Add signal for tracking view movements
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps] MapView: Add signal for tracking view movements
- Date: Wed, 17 Apr 2013 14:10:29 +0000 (UTC)
commit 7668e861449077419ed0db61a6f0f8532350b265
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Wed Apr 17 17:04:00 2013 +0300
MapView: Add signal for tracking view movements
src/mapView.js | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/src/mapView.js b/src/mapView.js
index 122831e..c854dcf 100644
--- a/src/mapView.js
+++ b/src/mapView.js
@@ -58,6 +58,9 @@ const MapView = new Lang.Class({
this.view = this.actor;
this.view.set_zoom_level(3);
+ this.view.connect('notify::latitude', Lang.bind(this, this._onViewMoved));
+ this.view.connect('notify::longitude', Lang.bind(this, this._onViewMoved));
+
this._properties = new Properties.Properties(this);
this.view.bin_layout_add(this._properties.actor,
Clutter.BinAlignment.FILL,
@@ -191,5 +194,9 @@ const MapView = new Lang.Class({
else
this.ensureVisible(locations);
},
+
+ _onViewMoved: function() {
+ this.emit('view-moved');
+ },
});
Signals.addSignalMethods(MapView.prototype);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]