baianat / hooper

🎠 A customizable accessible carousel slider optimized for Vue
https://baianat.github.io/hooper/
MIT License
720 stars 131 forks source link

Hooper is not Centered on the first Load, but it Centers after Zoom In & Out #183

Open anasalhakim opened 4 years ago

anasalhakim commented 4 years ago

Describe the bug Hey, i'm using Hooper with Vuejs and it's really cool. But there is a bug, which is bothering me.

On the very first Load the whole Hooper is not centered as other Elements (See Screenshot), but when i do a Zoom in and then out, or change the Windows Size then it gets Centered.

I don't know if this bug is already mentioned before and i've tried really to make a full research about it with no Luck.

Thanks in advance.

Screenshots Capture

philbenoit-ibsa commented 3 years ago

For anyone else coming across this the solution is pretty ugly but put a timeout for a short time after initialise and then hooper.restart()

setTimeout(() => { hooper.restart }, 200)