mapping-elections / site

Website for Mapping Early American Elections
http://earlyamericanelections.org
0 stars 2 forks source link

Z-index of map labels and popups #19

Closed lmullen closed 6 years ago

lmullen commented 6 years ago

When a label or popup in a map is at the edge of the div containing the leaflet map, almost always at the right or the top, the overflow is cut off. Easiest to demonstrate with a screen shot:

screenshot 2017-12-04 14 19 32 screenshot 2017-12-04 14 19 41

I think that it would be possible, if tricky, to fix this. There are styles for the popups and labels. I would think that changing the z-index on them would do the trick, but only if the divs containing the leaflet map were likewise raised. Leaflet sets z-indexes on its various container divs, but somehow there is some problem with the stacking order for leaflet map that I haven't been able to figure out.

lmullen commented 6 years ago

Not possible to do with z-index. Gave a little more wiggle room with the maxBounds and leaving as is.