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

Force update even on disabled shuffleInstance #321

Closed
hirbod opened this issue Aug 22, 2020 · 2 comments
Closed

Force update even on disabled shuffleInstance #321

hirbod opened this issue Aug 22, 2020 · 2 comments

Comments

@hirbod
Copy link

hirbod commented Aug 22, 2020

Shuffle version
v5.2.3

Describe the bug
calling update on disabled shuffleInstance does not relayout.

I'm not sure if you consider this a bug or if it's by design but I disable the shuffle right after initialization because I don't won't to rely on window.resize, rather I am using ResizeObserver for a more performant way. I want to call update but this does nothing as long as the instance is disabled.

I would love to force a re-layout whenever I call the update method (maybe consider to extend update(force))
Don't know what you think about it. Right now, I have to call .enable() and .disable() immediate in my ResizeObserver callback to trigger what I try to achieve.

@Vestride Vestride mentioned this issue Feb 9, 2022
13 tasks
@Vestride
Copy link
Owner

Added a force option in v6 to the update method https://github.com/Vestride/Shuffle/releases/tag/v6.0.0

@Vestride
Copy link
Owner

Also, v6 now uses ResizeObserver instead of the window resize event. Thanks for the suggestion!

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

No branches or pull requests

2 participants