After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 728039 - Maintain user location's selection
Maintain user location's selection
Status: RESOLVED FIXED
Product: gnome-maps
Classification: Applications
Component: map view
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-maps-maint
gnome-maps-maint
Depends on:
Blocks:
 
 
Reported: 2014-04-11 13:17 UTC by Zeeshan Ali
Modified: 2014-04-11 14:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
userLocation: Getter/setter for selection (1.04 KB, patch)
2014-04-11 13:17 UTC, Zeeshan Ali
committed Details | Review
mapView: Maintain user location's selection (1.09 KB, patch)
2014-04-11 13:17 UTC, Zeeshan Ali
committed Details | Review

Description Zeeshan Ali 2014-04-11 13:17:43 UTC
See patches.
Comment 1 Zeeshan Ali 2014-04-11 13:17:45 UTC
Created attachment 274095 [details] [review]
userLocation: Getter/setter for selection
Comment 2 Zeeshan Ali 2014-04-11 13:17:49 UTC
Created attachment 274096 [details] [review]
mapView: Maintain user location's selection

If user location is selected, currently that selection is lost on
updates. Lets maintain the selection un updates.
Comment 3 Jonas Danielsson 2014-04-11 14:30:42 UTC
Review of attachment 274095 [details] [review]:

Looks fine apart from nit below.

::: src/userLocation.js
@@ +118,3 @@
 
+    getSelected: function() {
+        return this._locationMarker && this._locationMarker.get_selected ();

We don't do the space before parenthesis thing in gjs.
Comment 4 Jonas Danielsson 2014-04-11 14:34:40 UTC
Review of attachment 274096 [details] [review]:

Looks good, apart from some style issues.
If the below is fixed then this can go as well.

::: src/mapView.js
@@ +167,3 @@
                                                     this.geoclue.location);
 
+        var selected = (this._userLocation)? this._userLocation.getSelected() : false;

We use let everywhere else so I think we should stick to that unless there is some special need to use var here?

Also, this could maybe be written as:
    let selected = this._userLocation && this._userLocation.getSelected();

?
Comment 5 Zeeshan Ali 2014-04-11 14:58:42 UTC
Attachment 274095 [details] pushed as f30b71f - userLocation: Getter/setter for selection
Attachment 274096 [details] pushed as 8738c9f - mapView: Maintain user location's selection