Skip to content
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

Reposition Cropper for Progressively Loaded High Resolution Image #55

Open
omairnabiel opened this issue Jan 16, 2024 · 1 comment
Open

Comments

@omairnabiel
Copy link

My use case is that I have to load high resolution images that can take upto 10 seconds to load. The work-around is that I initially load a low resolution image and when high resolution image is fetched in background I replace it. There are 2 problems that I'm facing currently.

  1. Whenever the image is replaced using setState there's a flicker for a second
  2. If user has already started moving the cropper on low res image, upon replacing it with high-res image the cropper resets

Is there a way to avoid the flicker and preserve the cropper position? Preserving the cropper is a little challenging as the image height and width for high-res changes dramatically and previously saved coordinates don't fit right. Thanks

@Norserium
Copy link
Collaborator

@omairnabiel, well it's interesting issue and I see pretty much ways to resolve it. But there is an important nuance. What should happen if an user tries to crop an image before the high resolution image will be loaded?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants