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

Added fitEither option to Image widget #56

Merged

Conversation

Kyarigwo
Copy link
Contributor

@Kyarigwo Kyarigwo commented Jan 4, 2022

I have added a new fit option to the image widget, 'fitEither', which will use either 'fitWidth' or 'fitHeight', whichever does not truncate any of the image. So it allows the image to be as large as possible, but keep the ratio.

I am not sure about is how to handle the imageRepeatX and imageRepeatY options. I think that they should be disabled, like for fitNone, but that will require more changes to the code.

Copy link
Owner

@fjvallarino fjvallarino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Kyarigwo looks good! 👍

I think leaving the imageRepeat options as they are is fine since it matches the behavior for individual fitHeight/fitWidth.

Thanks!

@fjvallarino fjvallarino merged commit dca65ea into fjvallarino:main Jan 7, 2022
@Kyarigwo Kyarigwo deleted the feature/add-fitEither-to-Image branch January 8, 2022 03:10
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