You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When image file is selected for the first time, the crop result is correct.
After select another image file, the crop result becomes wrong. You might need to change the zoom slider sometimes to see the wrong result.
After refresh browser and select image file, the crop result becomes correct again.
Root cause:
I found the root cause is incorrect self._originalImageWidth & self._originalImageHeight values after image file is changed. They got the values from self.elements.preview.getBoundingClientRect() in _updatePropertiesFromImage() function, I am not sure what is the reason to use getBoundingClientRect(), but changing to the following codes in _updatePropertiesFromImage() function seems to fix the issue:
self._originalImageWidth = img.width;
self._originalImageHeight = img.height;
The text was updated successfully, but these errors were encountered:
I can't find the issue at the moment, but this has been reported and I'm pretty sure this one will be resolved in 2.5.2 You can even use the code in master to confirm if you'd like.
Reproduction scenario:
Refer to video here: https://screencast-o-matic.com/watch/cFVj16oiio)
Root cause:
I found the root cause is incorrect self._originalImageWidth & self._originalImageHeight values after image file is changed. They got the values from self.elements.preview.getBoundingClientRect() in _updatePropertiesFromImage() function, I am not sure what is the reason to use getBoundingClientRect(), but changing to the following codes in _updatePropertiesFromImage() function seems to fix the issue:
self._originalImageWidth = img.width;
self._originalImageHeight = img.height;
The text was updated successfully, but these errors were encountered: