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 height/width calculations when height/width not numeric values.… #1415

Merged
merged 1 commit into from Sep 15, 2018
Merged

Conversation

nojacko
Copy link
Contributor

@nojacko nojacko commented Sep 11, 2018

… Allows for the auto height/width to be preserved.

Problem I had: When I added images to Grapes, I'd set width: <image's width>; max-width: 100%; height: auto; so the image works well with responsive designs.

  1. When the attempting to resize by dragging, some values got set to NaNpx. This solves that.
  2. It also gives to option to keepAutoHeight and (for completeness, don't think i've see width: auto used before) keepAutoWidth which prevents height or width changing if the values were 'auto'. Defaults to off to preserve current behaviour.

… Allows for the auto height/width to be preserved.
@artf
Copy link
Member

artf commented Sep 15, 2018

Very cool, I see you used widthAuto in SelectComponent.js instead of autoWidth but it's ok, I'm gonna fix it :)
Thanks @nojacko 👍

@artf artf merged commit d87466e into GrapesJS:dev Sep 15, 2018
@nojacko
Copy link
Contributor Author

nojacko commented Sep 17, 2018

Nice spot. Thanks.

@lock
Copy link

lock bot commented Sep 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the outdated label Sep 24, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Sep 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants