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

Cropper not triggering crop start when dragging in straight line #1208

Open
knizinsky opened this issue Oct 13, 2024 · 2 comments
Open

Cropper not triggering crop start when dragging in straight line #1208

knizinsky opened this issue Oct 13, 2024 · 2 comments

Comments

@knizinsky
Copy link

Cropper version

v1.6.2

Link to minimal reproduction

https://fengyuanchen.github.io/cropperjs/

Steps to reproduce

  1. Press and hold the left mouse button at the point where you want to start cropping.
  2. While holding the left mouse button, move the cursor in a straight line (e.g., left/right/top/bottom).
  3. Instead of starting to select the area to be cropped, nothing happens.

cropperjs

What is expected?

After pressing down the pointer and moving the mouse, even in a straight line, the crop start event should be triggered, and a new crop box should appear.

What is actually happening?

While holding the left mouse button, and then moving the cursor in a straight line, Instead of starting to select the area to be cropped, nothing happens. When you move the cursor in a different direction, then crop box is created.

System Info

No response

Any additional comments?

No response

@fengyuanchen
Copy link
Owner

fengyuanchen commented Nov 4, 2024

To create a crop box, you need to drag a rectangle area, but not a straight line.

@knizinsky
Copy link
Author

knizinsky commented Nov 9, 2024

Thank you for the answer, but shouldn't the crop box appear from the point where user started holding mousedown? In the attached gif, you can see that by dragging diagonally (not even in a perfectly straight line) the crop box only appears after some time. This is especially troublesome on smaller images.

cropper

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

No branches or pull requests

2 participants