Skip to content
New issue

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

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

Already on GitHub? # to your account

Re-render on resize. #123

Merged
merged 3 commits into from
Aug 2, 2019
Merged

Re-render on resize. #123

merged 3 commits into from
Aug 2, 2019

Conversation

gavinkilbride
Copy link
Contributor

Trigger re-render on window resize.

Fixes the issue where resizing shows sibling carousel item. Debouncer added to limit unnecessary redraw.

Example:
Resize

Copy link
Owner

@amio amio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

I think calling updateFrameSize() on resize might do the job, would you give it a try?

@gavinkilbride
Copy link
Contributor Author

Hey Amio,
Yes, updateFrameSize() was enough, although I did have to use prepareSiblingFrames() in the callback. Also fixed typo and reduced screen flicker by shortening debounce.

Copy link
Owner

@amio amio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks! @gavinkilbride

@amio amio merged commit aaf56b6 into amio:master Aug 2, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants