-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
mousemove
event dispatches when moving anywhere
#2310
Comments
- Don't fire mousemove or touchmove unless hit is true - Fixes issue described in pixijs#2310
- Don't fire mousemove or touchmove unless hit is true - Fixes issue described in pixijs#2310
Some kinds of drap/drog wouldn't work if mousemove wasn't called while the cursor is outside the object though, for eg, imagine manipulating a control knob. Once the knob was clicked, it shouldn't let go until mouseup. |
Valid point! But I'm not really sure if this use case justifies emitting For your example it would actually be wiser to use the pointer lock api Otherwise ux would be flawed anyway because if your window is small you'd
|
"on top of that the mouseup event will probably not even be captured thats why there's a mouseupoutside, here's a similar issue #1250 |
Since there's already similar issue I guess that has to mean that other developers are also surprised by the behaviour... It's however true that it can easily be checked for so its not really a big deal. I just don't think it makes sense. I could just as well put the |
No it's intended behaviour ;) it does make sense too imo, imagine you putting a mousemove handler on the root, it could work sure, but then you'd need to keep track of the currently dragging item in the root (to be set in the mousedown handler of the item), now imagine using touch and doing that for 10+ items ;) Just set some property 'isDown' or something when you start a mousedown on an item, then in your mousemove do the moving and set the isDown = false in the mouseup(outside) of that item |
Hello! We have decided to offer the best of both worlds for this issue. The default of this property is true. 👍 |
Thanks @GoodBoyDigital ! |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Greetings, thanks for a great tool...
I discovered that the
mousemove
event is fired even though the mouse movement happens outside of the targeted DisplayObject.. This may also be true for thetouchmove
event.I assume it's only about checking if a hit occured and don't fire unless so..
Is this correctly assumed? Should I open a pr?
The text was updated successfully, but these errors were encountered: