homeflowjs 0.10.21 → 0.10.22

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "homeflowjs",
3
- "version": "0.10.21",
3
+ "version": "0.10.22",
4
4
  "description": "JavaScript toolkit for Homeflow themes",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -58,7 +58,7 @@ export default class DraggableMap {
58
58
  this.setMarkersFor(properties);
59
59
  }
60
60
  if (this.noLocationfound) { this.setToMarkeredBounds(); }
61
- if (Homeflow.get('custom_map_zoom')) {
61
+ if (Homeflow.get('custom_map_zoom') !== null) {
62
62
  this.map.setZoom(Homeflow.get('custom_map_zoom'));
63
63
  }
64
64
  }
@@ -191,13 +191,14 @@ export default class DraggableMap {
191
191
  }
192
192
 
193
193
  generateMap(map_options) {
194
- const zoomMax = Homeflow.get('custom_max_zoom') ? Homeflow.get('custom_max_zoom') : 16;
194
+ const zoomMax = Homeflow.get('custom_max_zoom') !== null? Homeflow.get('custom_max_zoom') : 16;
195
+ const zoomMin = Homeflow.get('custom_min_zoom') !== null ? Homeflow.get('custom_min_zoom') : 6;
195
196
  const zoomPosition = Homeflow.get('custom_map_zoom_location') ? Homeflow.get('custom_map_zoom_location') : '';
196
197
 
197
198
  if (map_options == null) {
198
199
  map_options = {
199
200
  ...(zoomPosition !== '') && {zoomControl: false},
200
- minZoom: 6,
201
+ minZoom: zoomMin,
201
202
  maxZoom: zoomMax,
202
203
  scrollWheelZoom: Homeflow.get('enable_scroll_wheel_zoom'),
203
204
  dragging: !Homeflow.get('disable_draggable_map')
@@ -48,10 +48,11 @@ export default class DrawableMap extends DraggableMap {
48
48
 
49
49
  generateMap(map_options) {
50
50
  const zoomMax = Homeflow.get('custom_max_zoom') ? Homeflow.get('custom_max_zoom') : 16;
51
+ const zoomMin = Homeflow.get('custom_min_zoom') !== null ? Homeflow.get('custom_min_zoom') : 6;
51
52
  const drawLocation = Homeflow.get('custom_map_draw_location') ? Homeflow.get('custom_map_draw_location') : 'bottomleft';
52
53
 
53
54
  map_options = {
54
- minZoom: 6,
55
+ minZoom: zoomMin,
55
56
  maxZoom: zoomMax,
56
57
  scrollWheelZoom: Homeflow.get('enable_scroll_wheel_zoom'),
57
58
  'zoomControl': false,