homeflowjs 0.13.50 → 0.13.51

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.13.50",
3
+ "version": "0.13.51",
4
4
  "sideEffects": [
5
5
  "modal/**/*",
6
6
  "user/default-profile/**/*",
@@ -257,6 +257,25 @@ export default class DrawableMap extends DraggableMap {
257
257
 
258
258
  });
259
259
 
260
+ Homeflow.registerEvent('drawable_map_cancelled', () => {
261
+ this.map.removeLayer(this.marker_layer);
262
+ if (this.nonClusteringMarkerLayer) { this.map.removeLayer(this.nonClusteringMarkerLayer); }
263
+ if (this.geo_marker_layer != null) { this.map.removeLayer(this.geo_marker_layer); }
264
+ store.dispatch(setSearchField({ poly: null }));
265
+ if (Homeflow.get('initial_properties_payload')) {
266
+ const initialProperties = Homeflow.get('initial_properties_payload');
267
+ this.properties = initialProperties;
268
+ this.setMarkers();
269
+ }
270
+
271
+ document.querySelector('.js-draw-map-search-loader').style.display = 'none';
272
+ this.onMapDrag();
273
+ });
274
+
275
+ Homeflow.registerEvent('reset_list_results_after_draw_deleted', () => {
276
+ this.onMapDrag();
277
+ })
278
+
260
279
  return this.map.on("draw:deleted", e => {
261
280
  this.map.removeLayer(this.marker_layer);
262
281
  if (this.nonClusteringMarkerLayer) { this.map.removeLayer(this.nonClusteringMarkerLayer); }