homeflowjs 0.13.16 → 0.13.18
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')) {
|