在我的简单应用程序中,我需要隐藏原始光标 stage.cursor = 'none'; stage.enableMouseOver()
,然后用我自己的图片替换它
然后我在 stagemousemove
事件上注册监听器:
myBitmap.x = stage.mouseX;
myBitmap.y = stage.mouseY;
此操作后,我将失去在其他舞台对象上监听鼠标事件的权限:
//nothing happen on mouse over
someBitmap.on('mouseover', function() { console.log(1) });
是否有任何可能的解决方案,期望每次在舞台鼠标事件中对我的对象进行 hitTest 时检查?
最佳答案
通过在我的 css 规则中设置 cursor: none
并从 js 中删除 stage.cursor = 'none'
来修复。谢谢@Andew例如。
关于javascript - 禁用舞台光标上的画架鼠标事件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38915451/