-
Notifications
You must be signed in to change notification settings - Fork 126
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
Coordinates do not clear properly when using Firefox #11
Comments
Hello! I've just tested this scenario and it is processed correctly. Could you test uploading images at this example? What's the uploading images? What's the version of Firefox do you use? |
The version of Firefox I'm using is 69.0.1. The images are just regular PNG's, JPG's, JPEG's. I used the exact method you linked in the first place. After further investigation, it seems like it clears at first but once my image is actually saved to the db, the coordinates mess up. |
Let's define. Does this problem occur in my examples or this problem is specific to your code only? In the second case me need additional details about your code or an example at the codesandbox. |
Do you want anything specific in terms of my code? |
First of all, I want to know, could you reproduce this problem at the documentation examples. Secondly, if it's not possible, me need details about your specific case. Maybe, code that uses this library or something else. |
I have also noticed these errors but I don't know if it's of any help: |
Could you provide more code? What is |
Cropper component:
cropImage method (using TypeScript):
|
And what's happening with |
Exactly what is in your docs when uploading a photo. |
Try to update to |
Canvas is There is temporary fix: cropImage({ coordinates, canvas }: {
coordinates: { width: number, height: number, left: number, top: number },
canvas: HTMLCanvasElement
}) {
this.coordinates = coordinates;
if (canvas) {
canvas.toBlob(blobData => {
this.croppedPhoto = blobData;
})
} else {
this.croppedPhoto = null;
}
} |
Awesome man. Thanks so much for helping me out. I really appreciate it! |
You are welcome! |
When uploading an image the first time, it works as expected. When uploading another image consecutively after, the coordinates do not clear properly. Left and top coordinates become NaN and height and width stay the same.
On Chrome, coordinates clear properly each time.
The text was updated successfully, but these errors were encountered: