Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: Call onInit function in resizeHandler. #198

Open
jisi724 opened this issue Jul 26, 2018 · 2 comments · Fixed by DenverCoderOne/siemano#6
Open

Suggestion: Call onInit function in resizeHandler. #198

jisi724 opened this issue Jul 26, 2018 · 2 comments · Fixed by DenverCoderOne/siemano#6

Comments

@jisi724
Copy link

jisi724 commented Jul 26, 2018

Hi @pawelgrzybek ,

Thanks for your amazing work, I got to admit that Siema is the neatest carousel I've used so far.

However, I found a small but annoying issue that Siema will rebuild itself without calling the onInit function once you resizing the screen. As a result, all the extra features you code in onInit function will be lost once the screen resized.

My suggestion is to add

    this.buildSliderFrame();
    this.config.onInit.call(this);

at the end of resizeHandler method so that it won't lose any functions.

Please let me know how you think about this suggestion. I'd like to make a PR if you want.

@pawelgrzybek
Copy link
Owner

Hi.

It is a great suggestion. I would be more explicit and call it onResize.

Thanks for suggestion. One day when I catch up other stuff, I will add it to Siema for sure 👋

@jisi724
Copy link
Author

jisi724 commented Jul 27, 2018

sounds good! feel free to close this issue now or whenever you add the feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants