Skip to content

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.

2 participants