homeflowjs 1.0.99 → 1.0.101
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
|
@@ -231,17 +231,34 @@ export default class DraggableMap {
|
|
|
231
231
|
marker.property = property;
|
|
232
232
|
|
|
233
233
|
if (!Homeflow.get('do_not_show_marker_popup')) {
|
|
234
|
-
const
|
|
235
|
-
const
|
|
236
|
-
const t = compiled({ property });
|
|
234
|
+
const lodashTemplatePopup = document.getElementById('property-map-popup-template');
|
|
235
|
+
const liquidTemplatePopup = document.querySelector(`.property-map-popup-template[data-property-id="${property.property_id}"]`);
|
|
237
236
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
237
|
+
if (lodashTemplatePopup) {
|
|
238
|
+
const compiled = template(lodashTemplatePopup.innerHTML);
|
|
239
|
+
const t = compiled({ property });
|
|
241
240
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
marker.
|
|
241
|
+
Homeflow.kickEvent('map_marker_rendered', property);
|
|
242
|
+
const popup = new L.Point(Homeflow.get('autopan_padding')[0], Homeflow.get('autopan_padding')[1]);
|
|
243
|
+
marker.bindPopup(t, { autoPanPadding: popup, autoPan: !Homeflow.get('disable_map_pop_up_scroll') });
|
|
244
|
+
|
|
245
|
+
if (Homeflow.get('pop_up_on_mouseover')) {
|
|
246
|
+
marker.on("mouseover", e => marker.openPopup());
|
|
247
|
+
marker.on("mouseout", e => setTimeout((() => marker.closePopup()), 4000));
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
if (liquidTemplatePopup) {
|
|
252
|
+
const html = liquidTemplatePopup.innerHTML;
|
|
253
|
+
|
|
254
|
+
Homeflow.kickEvent('map_marker_rendered', property);
|
|
255
|
+
const popup = new L.Point(Homeflow.get('autopan_padding')[0], Homeflow.get('autopan_padding')[1]);
|
|
256
|
+
marker.bindPopup(html, { autoPanPadding: popup, autoPan: !Homeflow.get('disable_map_pop_up_scroll') });
|
|
257
|
+
|
|
258
|
+
if (Homeflow.get('pop_up_on_mouseover')) {
|
|
259
|
+
marker.on("mouseover", e => marker.openPopup());
|
|
260
|
+
marker.on("mouseout", e => setTimeout((() => marker.closePopup()), 4000));
|
|
261
|
+
}
|
|
245
262
|
}
|
|
246
263
|
}
|
|
247
264
|
|
|
@@ -250,6 +267,7 @@ export default class DraggableMap {
|
|
|
250
267
|
if (Homeflow.get('select_marker_on_click')) {
|
|
251
268
|
marker.on('click', e => store.dispatch(setSelectedMarker(e.target)));
|
|
252
269
|
}
|
|
270
|
+
|
|
253
271
|
return window['map_marker_' + property.property_id] = marker;
|
|
254
272
|
}
|
|
255
273
|
|
|
@@ -663,7 +681,8 @@ export default class DraggableMap {
|
|
|
663
681
|
|
|
664
682
|
const params = [];
|
|
665
683
|
|
|
666
|
-
if ((search.type) && (search.type !== "")) { params.push("tag-" + search.type); }
|
|
684
|
+
if ((search.type) && (search.type !== "")) { params.push("tag-" + search.type); }
|
|
685
|
+
if (search.tags && search.tags.length) { params.push("tag-" + search.tags.join(',')); }
|
|
667
686
|
if (search.minBeds) { params.push("from-" + search.minBeds + "-bed"); }
|
|
668
687
|
if (search.maxBeds) { params.push("up-to-" + search.maxBeds + "-bed"); }
|
|
669
688
|
|