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 #301

Merged
merged 7 commits into from
Sep 1, 2024
Merged

Conversation

oleojake
Copy link
Collaborator

Closes #287

@oleojake oleojake requested a review from brauliodiez August 30, 2024 10:22
{
width: imageSelected.width,
height: imageSelected.width / aspectRatio,
},
Copy link
Member

Choose a reason for hiding this comment

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

We could encapsulate this an utils function and place it under common/utils/image.utils.ts

Something like:

** Not sure about the params

const adjustSizeKeepingAspectRatio = (imageSize : Size, componentSize : Size) : Size => 

then we can use the same funcion in the drag and load image (We don't repeat code)

@brauliodiez brauliodiez merged commit bfd27aa into main Sep 1, 2024
1 check passed
@brauliodiez brauliodiez deleted the feature/#287-image-aspect-ratio branch September 1, 2024 17:46
@brauliodiez brauliodiez restored the feature/#287-image-aspect-ratio branch September 2, 2024 10:28
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.

Drop image or select image, set aspect ratio
2 participants