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

"How to implement zooming based on the position of two fingers on H5?" #579

Open
ssffss123 opened this issue Jan 7, 2025 · 12 comments
Open

Comments

@ssffss123
Copy link

In the H5 version of react-easy-crop, when zooming in with two fingers, it zooms in based on the center of the image instead of the position between the two fingers. However, on the PC version, it zooms based on the position of the touch points. How can I implement zooming based on the position of the two fingers on H5?

@ValentinH
Copy link
Owner

What is "H5"?

@ssffss123
Copy link
Author

什么是“H5”?

Mobile app h5

@ssffss123
Copy link
Author

I hope to receive your answer

@ValentinH
Copy link
Owner

This is the first time I hear about H5 apps (we don't have this in Europe) so I'm not sure what the specifics are. From what I read, these apps are using usual HTML5 and JS code so I don't understand why the zooming would not work as on other browsers/devices. 🤔

@ssffss123
Copy link
Author

This is the first time I hear about H5 apps (we don't have this in Europe) so I'm not sure what the specifics are. From what I read, these apps are using usual HTML5 and JS code so I don't understand why the zooming would not work as on other browsers/devices. 🤔

This is the first time I hear about H5 apps (we don't have this in Europe) so I'm not sure what the specifics are. From what I read, these apps are using usual HTML5 and JS code so I don't understand why the zooming would not work as on other browsers/devices. 🤔

It refers to the browser on the mobile phone. I am a Chinese and I translated it with translation software. There may be errors

@ssffss123
Copy link
Author

This refers to the browser on the mobile phone. When zooming, the center point of zooming is different from the browser on the computer. The browser on the mobile phone cannot start zooming from the position of two fingers.

@ValentinH
Copy link
Owner

Well if you try the demo of https://valentinh.github.io/react-easy-crop/ on your phone, the zooming point is based on the center between the 2 fingers.

@ssffss123
Copy link
Author

Well if you try the demo of https://valentinh.github.io/react-easy-crop/ on your phone, the zooming point is based on the center between the 2 fingers.

n this demo, in the middle square, if you zoom in on the dog’s eyes in this square, you will find that as you zoom in, the dog’s eyes move to the middle square. What I want is that the dog’s eyes will move with the zoom. Zoom is always between two fingers

@ValentinH
Copy link
Owner

Ok, I think I get what you mean. This logic is quite complex so I can't promise I'll take the time to work on improving soon.
Would you like to try doing a PR for it?

@ssffss123
Copy link
Author

Ok, I think I get what you mean. This logic is quite complex so I can't promise I'll take the time to work on improving soon. Would you like to try doing a PR for it?

Hello, I don’t understand what you mean “PR”

@ValentinH
Copy link
Owner

A pull request adding the fix.

@ssffss123
Copy link
Author

A pull request adding the fix.

Hello, my technology is not very good, so I am not very good at fix this problem

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