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

max-height option #5

Open
rmeissn opened this issue Apr 5, 2017 · 1 comment
Open

max-height option #5

rmeissn opened this issue Apr 5, 2017 · 1 comment

Comments

@rmeissn
Copy link

rmeissn commented Apr 5, 2017

Thank you @jerryshew for this nice and useful library!

A nice addition would be a max-height option (instead of always sizing the image to the maximum width of the container), in order to limit portrait (e.g. 9:16) pictures from being rendered too huge. The implementation could even provide options for setting this as a pixel size or relative to the window/container size, in order to fit the picture to the screen.

Or is there a workaround that I've missed? The only way I can think of is to limit the container width separately for different pictures by reading picture width and height and to add a width limiting grid in case it's a portrait picture.

I noticed that @Pajn implemented the feature as a fork of your project: https://github.com/Pajn/react-image-cropper/commits/master
@Pajn I haven't tested your code yet, but would you be able to issue a PR back to this project, in case your implementation works fine?

@flyfloor
Copy link
Owner

@rmeissn you can create a PR

tinsaye added a commit to tinsaye/react-image-cropper that referenced this issue Oct 10, 2017
Instead of always sizing the image to the maximum width gives an option for limiting by height to prevent portrait beeing renderd to huge. Implementation is based on @pjan fork.
Solves @rmeissn issue flyfloor#5

prop limitHeight:	0 - for not limiting by height - default value
			value - max height
tinsaye added a commit to slidewiki/react-image-cropper that referenced this issue Dec 5, 2017
Instead of always sizing the image to the maximum width gives an option for limiting by height to prevent portrait beeing renderd to huge. Implementation is based on @pjan fork.
Solves @rmeissn issue flyfloor/react-image-cropper#5

prop limitHeight:	0 - for not limiting by height - default value
			value - max height
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

No branches or pull requests

2 participants