Changeset 2384677
- Timestamp:
- 09/18/2020 07:58:33 PM (5 years ago)
- File:
-
- 1 edited
-
osm-map-elementor/trunk/osm-map.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
osm-map-elementor/trunk/osm-map.php
r2384642 r2384677 817 817 818 818 // prep tooltip content 819 let tooltipContent = null; 820 if (this.marker.marker_title && !this.marker.marker_description) { 821 tooltipContent = `<div class="marker-tooltip"><div class="marker-title">${this.marker.marker_title}</div></div>`; 822 } else if (this.marker.marker_description && this.marker.show_button !== 'yes') { 823 tooltipContent = `<div class="marker-tooltip"><div class="marker-title">${this.marker.marker_title}</div><div class="marker-content"><div class="marker-description">${this.marker.marker_description}</div></div></div>`; 824 } else if (this.marker.show_button === 'yes' && !this.marker.marker_description) { 825 tooltipContent = `<div class="marker-tooltip"><div class="marker-title">${this.marker.marker_title}</div><div class="marker-content"><div class="marker-button"><a class="elementor-button" target="_blank" href='${this.marker.button_url}'>${this.marker.button_text}</a></div></div></div>`; 826 } else if (this.marker.show_button === 'yes') { 827 tooltipContent = `<div class="marker-tooltip"><div class="marker-title">${this.marker.marker_title}</div><div class="marker-content"><div class="marker-description">${this.marker.marker_description}</div><div class="marker-button"><a class="elementor-button" target="_blank" href='${this.marker.button_url}'>${this.marker.button_text}</a></div></div></div>`; 819 let tooltipContent = '<div class="marker-tooltip">'; 820 821 // add marker title 822 if (this.marker.marker_title) { 823 tooltipContent += `<div class="marker-title">${this.marker.marker_title}</div>`; 828 824 } 829 825 826 // marker content 827 tooltipContent += '<div class="marker-content">'; 828 829 // add marker description 830 if (this.marker.marker_description) { 831 tooltipContent += `<div class="marker-description">${this.marker.marker_description}</div>`; 832 } 833 834 // add marker button 835 if (this.marker.show_button === 'yes' && this.marker.button_text) { 836 tooltipContent += `<div class="marker-button"><a class="elementor-button" target="_blank" href='${this.marker.button_url}'>${this.marker.button_text}</a></div>`; 837 } 838 839 tooltipContent += '</div>'; 840 tooltipContent += '</div>'; 841 830 842 // add tooltip to marker 831 if (t ooltipContent) {843 if (this.marker.marker_title || this.marker.marker_description || this.marker.button_text && this.marker.show_button) { 832 844 marker.bindPopup(tooltipContent); 833 845 }
Note: See TracChangeset
for help on using the changeset viewer.