cotton123236 / zoomist

Zoomist is a library built with TypeScript that allows you to create zoom elements on website quickly and easily.
https://zoomist.vercel.app/
MIT License
110 stars 23 forks source link

Bug use zoomist with modal bootstrap #12

Closed Zecrum closed 2 years ago

Zecrum commented 2 years ago

Hello, I have a bug when I use zoomist in a modal box created with bootstrap. The image does not appear.

link jsfiddle : https://jsfiddle.net/kjuL1375/11/

Can you help me ?

Thanks you Alexandre

cotton123236 commented 2 years ago

Hello @Zecrum

That is because you use show.bs.modal event for your example. According to bootstrap docs show.bs.modal event fires immediately when the show instance method is called, so zoomist will get the wrong width and height data. You should use shown.bs.modal event for you modal.

And this is the recommend usage below

link jsfiddle : https://jsfiddle.net/sf7Lte2w/8/

Let me know if it's still not working. Thank you!

Zecrum commented 2 years ago

Hello,

It's work.

Thanks you and have a nice day !