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

image sometimes load as 0px by 0px, white blank background #25

Open jsznap opened 1 year ago

jsznap commented 1 year ago

I have a very standard implementation except i'm using Alpine-JS models. Sometimes when images load, they load with a width/height of 0px. resizing the image does not fix it. Anyone know of any reason this could happen?

cotton123236 commented 1 year ago

When you using frameworks, make sure you excute Zoomist after elements are rendered. Like React useEffect() hook, or Vue onMounted() lifecycle.

holyman1010 commented 1 year ago

I also has this issue, I'm using a tab navigation component of a dashboard template(https://myrathemes.com/lunoz/layouts/vertical/ui-tabs.html). When I want place an image inside the tab, the image's width and height become 0. but if I click the tab when the page reload at the first moment. It suddenly can display normal. I've tried many times and method, just don't work. Can anyone know what cause this issue?