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

Mouse click event bug? #21

Open
isensen opened this issue Mar 21, 2023 · 3 comments
Open

Mouse click event bug? #21

isensen opened this issue Mar 21, 2023 · 3 comments

Comments

@isensen
Copy link

isensen commented Mar 21, 2023

Hello, I have a problem, I have bound the click event to object A. Then I pressed the left mouse button on a blank space but did not release it, then I dragged the mouse to rotate the space (added orbitcontrol), when the mouse is on object A and released the left mouse button, it will activate the click event of A. This caused me to inadvertently activate the event when I just wanted to rotate the space.

@markuslerner
Copy link
Owner

Hi @isensen, sorry for my late reply. It would be great, if you could provide some sample code, so that I can test that.

@isensen
Copy link
Author

isensen commented Apr 20, 2023

Hi @markuslerner , thank you very much for your answer, and sorry for my late reply, in fact the demo provided by the official website has this problem, the click event should be equal to mousedown & mouseup on the same object, otherwise, when I rotate the model randomly in space, it is easy to trigger some click events by mistake. Looking forward to your reply!
demo

@markuslerner
Copy link
Owner

Thank you @isensen, now I know what you mean. One would need to check, if the mousedown event has been detected on that object before the click gets fired. I can implement this as soon as I find the time.

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