svelte-grid
svelte-grid copied to clipboard
Fixed jumping items on component resize.
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.
Fix for issue https://github.com/vaheqelyan/svelte-grid/issues/125.