🚸 preserve zoom and pan on image change #42
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
when image is changed, (and its size is different) zoom and pan will be preserved.
This will most likely need to be revisited because when compressed images are being sent, their sizes differ depending on the zoom, and thus we most likely won't be able to determine whether the image size is the same?
Also we will need to upgrade this with the same system we add where we ask for specific part of the image.
The image size needs to be there because if image1 is 2500x2500 and image2 is 200x200, if we zoom on image1 and then switch to image 2, it would most likely result in a white screen since we would be panned out of 200x200 bounds