ember-animation / liquid-fire

Animations & transitions for ambitious Ember applications.
Other
1.15k stars 199 forks source link

Liquid-spacer does not update when the window is resized #641

Closed mattdonnelly closed 4 years ago

mattdonnelly commented 4 years ago

Description

The liquid-spacer component does not update its measurements when the window is resized. This means if the dimensions of the element wrapped in a liquid-spacer depend on the size of the window the rendering can look off.

Reproduction Steps

Ember Twiddle: https://ember-twiddle.com/bdaec35c250ea3c1c506cca859d28d57

1) Open the twiddle in a narrow browser window 2) Increase the width of the window 3) Observe the height of the text has shrunk but the liquid-spacer element remains the same size

Examples

GIF:

Example

ef4 commented 4 years ago

Thanks for reporting. This is a pretty small change if somebody wants to take a stab at it. Where we currently subscribe to a mutation observer, we would also listen to window resize events.