matejlatin / Gutenberg

A meaningful web typography starter kit.
Other
2.84k stars 159 forks source link

images squashed when resizing the window #40

Closed GeorgeStrakhov closed 8 years ago

GeorgeStrakhov commented 8 years ago

Suggest to add a debounced onresize hook to recalculate image sizes.

matejlatin commented 8 years ago

@GeorgeStrakhov yup I'm aware of this problem. Thanks for the suggestion. What do you mean by "debounced"?

GeorgeStrakhov commented 8 years ago

Sure. https://lodash.com/docs#debounce This is just a performance-optimising measure - to make sure that browser doesn't go crazy trying to run your resize function 60 times per second while the window is being resized.

On Thu, May 12, 2016 at 12:35 PM Matej Latin notifications@github.com wrote:

@GeorgeStrakhov https://github.com/GeorgeStrakhov yup I'm aware of this problem. Thanks for the suggestion. What do you mean by "debounced"?

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/matejlatin/Gutenberg/issues/40#issuecomment-218707512

matejlatin commented 8 years ago

Awesome, we should definitely do it. Thanks @GeorgeStrakhov

GeorgeStrakhov commented 8 years ago

No problem. A bit busy today, but can handle this and do a PR tomorrow.

On Thu, May 12, 2016 at 1:39 PM Matej Latin notifications@github.com wrote:

Awesome, we should definitely do it. Thanks @GeorgeStrakhov https://github.com/GeorgeStrakhov

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/matejlatin/Gutenberg/issues/40#issuecomment-218721240

GeorgeStrakhov commented 8 years ago

Sorry for late. Here you go: https://github.com/matejlatin/Gutenberg/pull/42

matejlatin commented 8 years ago

@GeorgeStrakhov thanks.