francoischalifour / medium-zoom

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

make SUPPORTED_FORMATS part of options #7

Closed karimhossenbux closed 7 years ago

karimhossenbux commented 7 years ago

It would be awesome if we could set SUPPORTED_FORMATS as we need.

Right now medium-zoom is enable on some SVG icons I have even if I target img tag: mediumZoom(document.querySelectorAll('.content img'))

Let me know what you think?

Cheers!

francoischalifour commented 7 years ago

That's interesting, thanks for pointing that out!

Can you please share your HTML template?

karimhossenbux commented 7 years ago

Actually I've been able to fix that by targeting the parent container (where there is no svg), and not the img tag itself. I'll try to make more test once back on that project!

francoischalifour commented 7 years ago

Hi @karimhossenbux, a similar issue was raised #8.

It is indeed a bug and I will publish a fix very soon (https://github.com/francoischalifour/medium-zoom/issues/8#issuecomment-305030768).

Thank you again 😄

francoischalifour commented 7 years ago

Closing for now as it should be fixed with aa8ff0f.

Please upgrade to 1.0.4 and let me know if you have other issues.