-
Notifications
You must be signed in to change notification settings - Fork 0
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
Constrain the size of the ImageCrop for large images. #8
Comments
Oh cool, I wasn't aware of that, thanks for pointing it out. I tried it and it's a big improvement! Would it make sense to set the Also, what are your thoughts on setting |
Hello. Thanks for calling this into our attention. A height of
I haven't yet analyzed how it would affect the different use cases (large image vs. small image, constrained vs. unconstrained container size, inside a dialog, etc.). Let's discuss it in #12. It would be a breaking change, but I'm not against breaking changes when they improve the developer experience. |
Feature proposal
Some images have a natural size that is quite large. Users typically expect that image to scale appropriately to fit within the screen. It would be cool if ImageCrop followed that convention. The image below shows an example... note that the cropping tool is barely visible and users have to scroll down to find it.
Describe solution expectations
My caveman approach to solving this is to set some styles for the
div
containingimageCrop
. The code below shows the modifications I made to theopenCropDialog
method of theUploadImageCropDemo
class. Note the use ofdialogLayout.getStyle().set()
method.As I said, it's quite crude. It would probably be better to set dimensions as percentages and ensure this works on all devices. Nonetheless, it is effective and creates a much better user experience (provided you can ignore many overlapping dialogs, which is my fault not yours) as you can see in the screenshot.
Additional information
No response
The text was updated successfully, but these errors were encountered: