8000 Mask overlay leaves a 1px-high area over the image · Issue #611 · dominictobias/react-image-crop · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Mask overlay leaves a 1px-high area over the image #611

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

8000 Closed
tmarcinkowski-logitech opened this issue Apr 9, 2025 · 2 comments
Closed

Mask overlay leaves a 1px-high area over the image #611

tmarcinkowski-logitech opened this issue Apr 9, 2025 · 2 comments

Comments

@tmarcinkowski-logitech
Copy link

Hi
I have a customized instance of the cropper, and changing the overlay color to white revealed an issue where the image doesn't cover the whole image, despite having 100% height, leaving a 1px-high line. The video at the bottom shows the issue.

For me, the hacky workaround was to expand it slightly, but you might want to investigate it properly.

  & .ReactCrop__crop-mask,
  & .ReactCrop__crop-mask mask > rect:first-child {
    height: 100.1%;
  }
Screen.Recording.2025-04-09.at.13.21.02.mov
@dominictobias
Copy link
Owner
dominictobias commented Apr 14, 2025

Thanks this is due to SVG's being rendered on the pixel while divs are rendered with precision up to 2 decimal places.

Screen.Recording.2025-04-14.at.19.24.21.mov

Your workaround is the only one I could find and I think a slight overflow which shouldn't be noticeable is better than an underflow 🤞

Plz try 11.0.10, I'm just overflowing by 0.5 pixels

@tmarcinkowski-logitech
Copy link
Author

I confirm that the issue is not observable anymore. Thanks for the swift response!

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
0