francoischalifour / medium-zoom

🔎🖼 A JavaScript library for zooming images like Medium
https://medium-zoom.francoischalifour.com
MIT License
3.58k stars 161 forks source link

z-index #155

Closed pricop closed 4 years ago

pricop commented 4 years ago

The problem

When objects in page have a z-index defined, those objects will overlay the actual zoomed image.

Solution

Option to set the z-index both for the overlay and the image itself. While setting the z-index to .medium-zoom-overlay and to .medium-zoom-image--opened fixes my particular issue, there are cases where multiple instances of zoom would need to have individual z-indexes set, hence a JS object per instance would be ideal.

francoischalifour commented 4 years ago

Since we don't want to add to the API for cases where there is an easy fix user-land—in this case, by overriding the CSS—we won't update the library.