Dogfalo / materialize

Materialize, a CSS Framework based on Material Design
https://materializecss.com
MIT License
38.86k stars 4.74k forks source link

Initializing carousel triggers `resize` event on window. #5100

Open realyze opened 7 years ago

realyze commented 7 years ago

I want to re-initialize the carousel on resize to make sure it looks OK. But since carousel trigger resize on window, that creates a loop.

So:

  1. Why is it necessary to trigger a resize event?
  2. Should the carousel auto-adapt on resize? It doesn't look like it does (I'm seeing multiple slides when I resize my window)

Thanks!

DanielRuf commented 7 years ago

Please provide a codepen and fill out the issue template.

sanatankc commented 7 years ago

I also have same issue. Is there any way to re-initialize carousel?

DanielRuf commented 7 years ago

@sanatankc Materialize 1.0.0-alpha.1 has a destroy method for all components.