homeflowjs 0.12.6 → 0.12.7

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.12.6",
3
+ "version": "0.12.7",
4
4
  "sideEffects": [
5
5
  "modal/**/*",
6
6
  "properties/properties-map/**/*",
@@ -317,7 +317,7 @@ export default class DraggableMap {
317
317
  if (this.bounds && this.bounds.isValid()) {
318
318
  return this.bounds;
319
319
  } else {
320
- if (Homeflow.get('breadcrumbs_map')) {
320
+ if (Homeflow.get('breadcrumbs_map') && this.viewport) {
321
321
  const viewportBounds = this.getViewportBounds();
322
322
  if (viewportBounds.flat().find(coordinate => coordinate === Infinity)) return null;
323
323
 
@@ -358,7 +358,7 @@ export default class DraggableMap {
358
358
  isDisplayProperties() {
359
359
  const { properties: { pagination: { total_count: totalCount } } } = store.getState();
360
360
 
361
- if (!this.breadcrumbs || !Homeflow.get('breadcrumbs_map')) {
361
+ if (!this.breadcrumbs || this.breadcrumbs?.length === 0 || !Homeflow.get('breadcrumbs_map')) {
362
362
  return true;
363
363
  } else if (this.properties && totalCount <= this.properties.length) {
364
364
  return true;
@@ -442,7 +442,7 @@ export default class DraggableMap {
442
442
  const placeBounds = this.buildSubPolygons(place.polygon)
443
443
  return this.map.fitBounds(placeBounds);
444
444
 
445
- } else {
445
+ } else if (!search.place?.viewport) {
446
446
  center = new L.LatLng(place.lat, place.lng);
447
447
  return this.map.setView(center, 12);
448
448
  }