[gnome-maps/wip/mlundblad/handle-osm-urls: 1/6] place: Add a property to mark as pre-filled
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/mlundblad/handle-osm-urls: 1/6] place: Add a property to mark as pre-filled
- Date: Thu, 27 Jun 2019 19:37:50 +0000 (UTC)
commit 632da83069fd59ee0e27cffc841c8c12b512d807
Author: Marcus Lundblad <ml update uu se>
Date: Thu Jun 27 21:33:20 2019 +0200
place: Add a property to mark as pre-filled
Property to set when adding Overpass data directly
when creating a place (such as when loading an OSM
object from a URL).
src/place.js | 15 +++++++++++++++
1 file changed, 15 insertions(+)
---
diff --git a/src/place.js b/src/place.js
index babb8b6..7d72af2 100644
--- a/src/place.js
+++ b/src/place.js
@@ -75,6 +75,13 @@ class Place extends Geocode.Place {
this._initialZoom = params.initialZoom;
delete params.initialZoom;
+ /* set to true if the instance is pre-filled with Overpass data,
+ * at the time of creation, as will be the case when loading a place
+ * from an OSM object URL
+ */
+ this._prefilled = params.prefilled;
+ delete params.prefilled;
+
/* Determines if the place should be added to the place store */
if (typeof(params.store) === 'undefined') {
this._store = true;
@@ -233,6 +240,14 @@ class Place extends Geocode.Place {
return this._initialZoom;
}
+ get prefilled() {
+ return this._prefilled;
+ }
+
+ set prefilled(prefilled) {
+ this._prefilled = prefilled;
+ }
+
_translateWheelchair(string) {
switch(string) {
/* Translators:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]