简体   繁体   English

Pixi.js的Touchmove和Mousemove事件目标不同?

[英]Pixi.js Touchmove and Mousemove event target different?

Pixi.js Touchmove and Mousemove event target have different targets. Pixi.js Touchmove和Mousemove事件目标具有不同的目标。 one seems to point to the DisplayObject and the other to the sprite within. 一个似乎指向DisplayObject,另一个指向其中的精灵。 Is there a way to stop propagation? 有没有办法阻止传播?

Thanks! 谢谢!

PixiInteractionData contains originalEvent where you can prevent immediate propagation. PixiInteractionData包含originalEvent,您可以在其中防止立即传播。 Your function will receive event as argument 您的函数将接收事件作为参数

function (event) {
    event.originalEvent.stopPropagation();
}

Also you can check it out in the docs. 您也可以在文档中查看。 http://www.goodboydigital.com/pixijs/docs/classes/InteractionData.html http://www.goodboydigital.com/pixijs/docs/classes/InteractionData.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM