-
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
Extra white space in cropped image #7
Comments
Been researching this more.... haven't nailed it down yet but there's some suspicious looking math in the calculation of the canvas dimensions. |
Was able to reproduce the problem in our demo by resizing the the demo view with the help of the split layout dividing the screen. We'll investigate the issue. |
Thanks @paodb , I was able to get it to work with my use case with the code below. The key changes:
Notes:
|
Describe the bug
Hello,
I'm having an issue where the cropped image includes extra white space to the right and bottom of the content. The attached screenshot shows this concretely by highlighting the area of the cropped img tag
Any thoughts on if this is indeed a bug, or user error on my part?
Many thanks for this add-on!
Expected behavior
My expectation is that any image would behave like the empty-plant example, where the the img is "tight" and contains no white space adjacent to the cropped selection.
Minimal reproducible example
I reproduced this example by cloning this repo, uploading my own png to the
images
directory, and modifying the source image in theBasicImageCropDemo
class as shown below. No other changes were made to the original code. I am attaching my test png here.That image is here:
Add-on Version
1.1.1-SNAPSHOT
Vaadin Version
24.4.6
Additional information
Using Chrome on a MacOS. Lmk if any other info would help!
The text was updated successfully, but these errors were encountered: