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

fix: remove animate flag after animation finished #2

Merged
merged 1 commit into from
Dec 29, 2021

Conversation

MaximKalinin
Copy link
Owner

@MaximKalinin MaximKalinin commented Dec 29, 2021

Description

This PR fixes the bug with page being overflow by x axis in some cases.

The reason behind the bug is that image gets moved on the right from the stack and usually stays there with display: none; css rule, so it does not impact the page sizes.

However, in case slide was cancelled, element does not disappear and stays with display: initial;. This makes page overflow by x axis in some cases.

To fix it, I added set_animate(false) at the end of each slide action. Previously it was called only after slide action start.

@MaximKalinin MaximKalinin added the bug Something isn't working label Dec 29, 2021
@MaximKalinin MaximKalinin self-assigned this Dec 29, 2021
@github-actions
Copy link

size-limit report 📦

Path Size
dist/react-stack-slider.cjs.production.min.js 1.46 KB (+0.07% 🔺)
dist/react-stack-slider.esm.js 1.61 KB (+0.07% 🔺)

@MaximKalinin MaximKalinin merged commit b87fbbb into develop Dec 29, 2021
@MaximKalinin MaximKalinin deleted the fix/animate branch December 29, 2021 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant