fgui 虚拟列表点击事件无效(偶发 频率较高)
cocos creator 2.4.3
fgui 在onRenderItem里面注册点击事件 item.m_cmpReward.on(fgui.Event.CLICK, this.onClickItem, this)
有时候滑动虚拟列表后 发现item下的cmpReward点击事件没有触发(偶发但是十次可能有4-5次没有触发),最后看源码clickTest方法
不符合这个条件return了>>>> Math.abs(ti.pos.x - ti.downPos.x) > 50 || Math.abs(ti.pos.y - ti.downPos.y) > 50) { return null }
fgui 在onRenderItem里面注册点击事件 item.m_cmpReward.on(fgui.Event.CLICK, this.onClickItem, this)
有时候滑动虚拟列表后 发现item下的cmpReward点击事件没有触发(偶发但是十次可能有4-5次没有触发),最后看源码clickTest方法
不符合这个条件return了>>>> Math.abs(ti.pos.x - ti.downPos.x) > 50 || Math.abs(ti.pos.y - ti.downPos.y) > 50) { return null }
没有找到相关结果
已邀请:
2 个回复
谷主
赞同来自:
zhufeng233
赞同来自: