I noticed that mousemove events fire even when the mouse is not over the item. I'm testing with a Sprite using a Texture and though the mouseover and mouseout work as expected, the mousemove happens whether the mouse is over the item or not. I'm testing against 4.4.4 (haven't upgraded to 4.5.0 yet). If this is something that was fixed in 4.5.0 please feel free to close this ticket.
Just to clarify here, it's possible this was intended functionality, but the documentation says otherwise:
Fired when a pointer device (usually a mouse) is moved while over the display object. DisplayObject's interactive property must be set to true to fire event.
Would you please provide a simple jsfiddle or jsbin that reproduces this behavior using the latest release? It's the best way for us to resolve bugs.
This is not a bug. Try this:
app.renderer.plugins.interaction.moveWhenInside = true;
This property determines if mousemove and touchmove events are fired only when the cursor is over the object. Setting to true will make things work more in line with how the DOM verison works. Setting to false can make things easier for things like dragging It is currently set to false as this is how pixi used to work. This will be set to true in future versions of pixi.
Or see: http://pixijs.download/release/docs/PIXI.interaction.InteractionManager.html
This should be explained in the documentation at least. At minimum, the default operation should be explained.
Please make a PR to update the documentation if you have a strong opinion about where that information should be. But as @rkrasky points out, it's pretty explicit.
@bigtimebuddy but it's not explicit. The documentation should describe the default behavior, but describes the behavior that occurs if you set app.renderer.plugins.interaction.moveWhenInside = true;.
Fair point! If you could submit a PR with an amended explanation that
satisfies, that would be fab.
Cheers!
On Fri, 14 Apr 2017 at 13:31, Matt Hicks notifications@github.com wrote:
@bigtimebuddy https://github.com/bigtimebuddy but it's not explicit.
The documentation should describe the default behavior, but describes the
behavior that occurs if you set app.renderer.plugins.interaction.moveWhenInside
= true;.—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/pixijs/pixi.js/issues/3928#issuecomment-294146003,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AC998ohGsHZCMfnacqfiUZqUy8BV23_Oks5rv2cPgaJpZM4M7ytA
.
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.
Most helpful comment
@bigtimebuddy but it's not explicit. The documentation should describe the default behavior, but describes the behavior that occurs if you set
app.renderer.plugins.interaction.moveWhenInside = true;.