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

Responsive resize causing random zoom and pan #1111

Open
FirstVertex opened this issue Oct 25, 2023 · 1 comment
Open

Responsive resize causing random zoom and pan #1111

FirstVertex opened this issue Oct 25, 2023 · 1 comment

Comments

@FirstVertex
Copy link

Describe the bug
Changing the viewport size results in a poor UX because the zoom and pan changed unpredictably.

To Reproduce
Steps to reproduce the behavior:

  1. Using Desktop resolution (mine is 1800px) go to https://fengyuanchen.github.io/cropperjs/
  2. Resize window down to width of approx 500px
  3. Release the mouse
  4. Resize window back to full desktop width (mine is 1800px)
  5. Notice the image is no longer properly centered or zoomed

Expected behavior
Expect that a change to the viewport size should not change the crop window contents.

Observed behavior
Observed an unpredictable and chaotic change of zoom and pan inside the crop window after resizing the viewport.

Screenshots
If applicable, add screenshots to help explain your problem.
image

Desktop (please complete the following information):

  • OS: [e.g. iOS] Windows 11
  • Browser [e.g. chrome, safari] Chrome
  • Version [e.g. 22] 118.0.5993.90 (Official Build) (64-bit)
@fengyuanchen
Copy link
Owner

You might set the restore option to false.

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