在laya中 已经阻止了滚轮事件,但stage还是能监听到,

let list:fairygui.GList = this.type2Con.getChild("n12").asList;
list.on(Laya.Event.MOUSE_WHEEL, this, this.OnClickLook);
this.type2Con.on(Laya.Event.MOUSE_WHEEL, this, this.OnClickLook);
this.gui.on(Laya.Event.MOUSE_WHEEL, this, this.OnClickLook);

private OnClickLook(e:Event)
{
e.stopPropagation();
console.log(e.target);
}
已邀请:

神仙他兄弟

赞同来自:

我阻止了MOUSE_DOWN是没有问题的  但阻止滚轮事件就有问题
this.type1Con.on(Laya.Event.MOUSE_DOWN, this, this.OnClickLook);
 

谷主

赞同来自:

直接设置scrollPane.mouseWheelEnabled。

要回复问题请先登录注册