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

Feature/#287 image aspect ratio #336

Merged
merged 5 commits into from
Sep 4, 2024
Merged

Conversation

oleojake
Copy link
Collaborator

@oleojake oleojake commented Sep 4, 2024

Added adjustSizeKeepingAspectRatio function in image.utils.ts

Now if you upload an image (no matter drop, double click or property option) and it is smaller than the defined shapeSizeRestriction, it will adjust to that smaller size.

If you try to upload a larger image for the first time, it will be set to the shapeSizeRestriction, or it will be set to the current size of the component image in case it has been modified.

Also, the image can only be scaled with the 4-corner transformer type, so it cannot adopt another AspectRatio at the moment.

@brauliodiez brauliodiez merged commit 38e4a54 into main Sep 4, 2024
1 check passed
@brauliodiez brauliodiez deleted the feature/#287-image-aspect-ratio branch September 4, 2024 22:04
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