Open rsbrowne opened 10 months ago
I solved this with a workaround
const handleImageOnLoad = (image: HTMLImageElement) => {
transformRef.current?.resetTransform()
}
The approach of calling a resetTransform when the image is loaded is not working
Describe the bug When the browser's cache is disabled the calculation for the image starting position (when not full width) seems to be incorrect. It seems that the calculation might be happening before the image is done loading and as a result 0 is being used for the image width and height (This is just my theory on what's going wrong but I also suspect this may be related to issue #112).
To Reproduce Steps to reproduce the behavior:
Expected behavior The image should be positioned correctly regardless of how long it takes the image asset to load
Screenshots
Desktop (please complete the following information):