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] Ability to specify maxWidth or maxHeight #51

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

initplatform
Copy link

@Donaldcwl great work putting this together.

There are certain scenarios that require specifying a maxWidth or a maxHeight specifically. I added both options.

Also added 2 test to test them.

@Donaldcwl
Copy link
Owner

Donaldcwl commented Apr 23, 2020

@initplatform Good suggestions! For the implementation, I think the performance will be better if we combine all three functions handleMaxWidthOrHeight, handleMaxWidth, and handleMaxHeight to one function by calculating the final width and height. It is because separating them will cause unnecessary canvas creation and drawing.

@initplatform
Copy link
Author

cool. Makes sense. I can take a stab at it, but it might be a week or so before I get a free cycle.

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.

None yet

2 participants