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
Trying to restore previous crop data #624
Comments
@orderwerks Thanks for reporting this. If you can make me a codesandbox with the issue, I can look into it and check what is the issue. |
@shekhar-shubhendu If you utilize the demo and add |
This now seems resolved with v2.1.8 |
There still is a bug with it... set the package.json in the demo to 2.1.8, and set the data to:
The crop box won't restore to y = 0. It respects x = 0, but for some reason won't allow y = 0. |
@orderwerks I am getting it to work with the data provided above. Did you try and hit the refresh button inside the preview window(dumb question)? 2.1.6 & 2.1.7 definitely didn't work. |
Please check this: https://codesandbox.io/s/exciting-pond-mncz0?file=/src/Demo.tsx |
I was able to reproduce what @orderwerks is getting on 2.1.8, it appears the positioning changes between screen widths. To Reproduce:
It most certainly doesn't look like the set data button results in @shekhar-shubhendu link, but the set data workaround does work for me in the link above. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Closing as there was no activity. Please reopen if required. |
I'm using v2.1.7 and when I pull the crop data using cropperRef.getData() and then pass this to the component property
data
, the previous crop data doesn't restore on the image:I've also tried setting this using the onInitialized callback, but same issue:
I've also tried passing in
getCropBoxData()
object as well to the same effect. Am I doing this correctly? or is this broken?Thanks.
The text was updated successfully, but these errors were encountered: