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

Fixed jumping items on component resize. #134

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

WbaN314
Copy link

@WbaN314 WbaN314 commented Aug 5, 2022

Items that are not leftmost in grid "jumped" when resizing the grid component.
This was due to the 0.2s transition animation playing whenever the grid component is resized.
Leftmost items transition in place thats why they appear to not jump.

The fix temporarily adds a CSS class called stopMove to the item in MoveResize whenever the grid component resizes.
This class overwrites the transition attribute such that no transition is played.
It is added via the flag moveAnimation.
MoveAnimation is set in the onResize handler for throttleUpdate + 100ms duration.
+100ms is required as exact matching of the throttleUpdate duration leads to stuttering.

Itmes that are not leftmost in grid "jumped" when resizing the grid component.
This was due to the 0.2s transition animation playing whenever the grid component is resized.
Leftmost items transition in place thats why they appear to not jump.

The fix temporarily adds a CSS class called stopMove to the item in MoveResize whenever the grid component resizes.
This class overwrites the transition attribute such that no transition is played.
It is added via the flag moveAnimation.
MoveAnimation is set in the onResize handler for throttleUpdate + 100ms duration.
+100ms is required as exact matching of the throttleUpdate duration leads to stuttering.
@WbaN314
Copy link
Author

WbaN314 commented Aug 5, 2022

Fix for issue #125.

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 this pull request may close these issues.

2 participants