-
-
Notifications
You must be signed in to change notification settings - Fork 168
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
Dragging cannot make the image fully inside the cropping box. #540
Comments
Did you change any CSS to reach this result? |
The way I use this component:
Plus custom CSS:
I think they are all css changes that I made. |
Yes so this is expected. The internal logic doesn't know anything about the style overrides so the positioning doesn't match anymore. What are you trying to achieve? Why using these overrides? |
Simply put, it is the exact effect at Instagram. I want the image to be displayed taking the full height of the container, which may lead to its width overflowing, and the overflowing parts are hidden, but they can be reached by dragging to the left or right. Now the bold part above is not achieveable. I think it should be doable, because the lib knows the container's border and that of the image, so it just needs to calculate the value for translation to make them overlapped. Now the max limit in my case is translating by 98px, which leads to the narrow strip. |
If I zoom in the image (make it bigger), the problem gets worse, and I can reach a even smaller portion of the image. |
Have you tried using the vertical-cover value for objectFit? |
Ah... It is my fault.. It should be I tried the wrong one (horizontal), then used the CSS
to make it look like it worked, but caused some internal conflicts which lead to the issue. Sorry about taking your time! |
No worries, I'm here to help 🙂 |
The text was updated successfully, but these errors were encountered: