homeflowjs 0.13.17 → 0.13.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
@@ -60,6 +60,12 @@ export default class DraggableMap {
|
|
60
60
|
this.render();
|
61
61
|
this.buildPolygon();
|
62
62
|
this.setMarkers();
|
63
|
+
if (!Homeflow.get('show_map_controls_on_mobile_popup_open')) {
|
64
|
+
// hides map controls when popup open on mobile so they don't
|
65
|
+
// sit on top of popup, z-index does not work for this as it
|
66
|
+
// is a design feature
|
67
|
+
this.initControlsMobile();
|
68
|
+
}
|
63
69
|
if (this.noLocationfound) { this.setToMarkeredBounds(); }
|
64
70
|
if (Homeflow.get('custom_map_zoom')) {
|
65
71
|
this.map.setZoom(Homeflow.get('custom_map_zoom'));
|
@@ -70,6 +76,29 @@ export default class DraggableMap {
|
|
70
76
|
return this.mapLoadedTimes = 2;
|
71
77
|
}
|
72
78
|
|
79
|
+
initControlsMobile() {
|
80
|
+
this.map.on('popupopen', () => {
|
81
|
+
if (window.innerWidth < 768) {
|
82
|
+
const zoomControls = document.querySelector('.leaflet-top.leaflet-right');
|
83
|
+
const drawControls = document.querySelector('.leaflet-bottom.leaflet-left');
|
84
|
+
|
85
|
+
zoomControls.style.visibility = 'hidden';
|
86
|
+
drawControls.style.visibility = 'hidden';
|
87
|
+
}
|
88
|
+
})
|
89
|
+
|
90
|
+
this.map.on('popupclose', () => {
|
91
|
+
if (window.innerWidth < 768) {
|
92
|
+
const zoomControls = document.querySelector('.leaflet-top.leaflet-right');
|
93
|
+
const drawControls = document.querySelector('.leaflet-bottom.leaflet-left');
|
94
|
+
|
95
|
+
zoomControls.style.visibility = 'visible';
|
96
|
+
drawControls.style.visibility = 'visible';
|
97
|
+
}
|
98
|
+
})
|
99
|
+
|
100
|
+
}
|
101
|
+
|
73
102
|
render() {
|
74
103
|
this.generateMap();
|
75
104
|
if (!Homeflow.get('free_text_search')) {
|
@@ -277,6 +306,7 @@ export default class DraggableMap {
|
|
277
306
|
|
278
307
|
this.properties.map(property => this.setPropertyMarker(property));
|
279
308
|
this.clusteringMarkerLayer.addTo(this.map);
|
309
|
+
this.nonClusteringMarkerLayer.addTo(this.map);
|
280
310
|
|
281
311
|
return this.bounds;
|
282
312
|
}
|
@@ -630,7 +660,7 @@ export default class DraggableMap {
|
|
630
660
|
this._running_update = false;
|
631
661
|
|
632
662
|
if (json.properties) {
|
633
|
-
setSearchResponse(json);
|
663
|
+
this.setSearchResponse(json);
|
634
664
|
}
|
635
665
|
})
|
636
666
|
}
|
@@ -91,6 +91,7 @@ export default class DrawableMap extends DraggableMap {
|
|
91
91
|
if (!additionalDrawing) {
|
92
92
|
this.drawnItems.clearLayers();
|
93
93
|
if (this.marker_layer) { this.map.removeLayer(this.marker_layer); }
|
94
|
+
if (this.nonClusteringMarkerLayer) { this.map.removeLayer(this.nonClusteringMarkerLayer); }
|
94
95
|
if (this.geo_marker_layer != null) { this.map.removeLayer(this.geo_marker_layer); }
|
95
96
|
if (this.circle != null) { this.map.removeLayer(this.circle); }
|
96
97
|
}
|
@@ -147,6 +148,7 @@ export default class DrawableMap extends DraggableMap {
|
|
147
148
|
this.map.on("draw:drawstart", e => {
|
148
149
|
this.first = false;
|
149
150
|
this.map.removeLayer(this.marker_layer);
|
151
|
+
if (this.nonClusteringMarkerLayer) { this.map.removeLayer(this.nonClusteringMarkerLayer); }
|
150
152
|
if (this.geo_marker_layer) { this.map.removeLayer(this.geo_marker_layer); }
|
151
153
|
if (this.circle) { this.map.removeLayer(this.circle); }
|
152
154
|
return Homeflow.kickEvent('drawbannertoggled', this);
|
@@ -235,6 +237,7 @@ export default class DrawableMap extends DraggableMap {
|
|
235
237
|
|
236
238
|
return this.map.on("draw:deleted", e => {
|
237
239
|
this.map.removeLayer(this.marker_layer);
|
240
|
+
if (this.nonClusteringMarkerLayer) { this.map.removeLayer(this.nonClusteringMarkerLayer); }
|
238
241
|
if (this.geo_marker_layer != null) { this.map.removeLayer(this.geo_marker_layer); }
|
239
242
|
store.dispatch(setSearchField({ poly: null }));
|
240
243
|
this.updateURL();
|