yafred / leaflet-responsive-popup

This plugin overrides L.Popup to remove the need to move the map to be able to see the content of the popup.
https://yafred.github.io/leaflet-responsive-popup/
BSD 2-Clause "Simplified" License
90 stars 20 forks source link

Tooltip over text in the popup when setting font-size #19

Closed OmegaSkiller closed 2 years ago

OmegaSkiller commented 2 years ago

I'm trying to make the text bigger in the content, but when I set it to 15px or more the tooltip comes over the text:

image image

JS: const popup = L.responsivePopup().setContent('<div class="buyPopup" id="land-detail-' + feature.properties.id + '">Loading...</div>');

CSS: .buyPopup { font-size: 16px; font-family: 'Mulish', sans-serif; text-align: center; }

yafred commented 2 years ago

Use className (same as L.Popup)

L.reponsivePopup({ className: 'buyPopup' })

OmegaSkiller commented 2 years ago

Just tried that, but it doesnt work 😞 const popup = L.responsivePopup({ className: 'buyPopup' }).setContent('<div class="buyPopup" id="available-detail-' + feature.properties.id + '">Loading...</div>'); image

OmegaSkiller commented 2 years ago

Also just noticed another issue image

OmegaSkiller commented 2 years ago

Ok, so the problem was that I was setting minWidth and minHeight in the bindPopup function and changing the content dynamically. I added the min-width and min-height to css and it worked!

Sorry for spamming. Closing this! 😄