CCNode.js 中
不明白为啥要吧TouchEnd 转为TouchCancel
正常TouchCancel 不应该是这个逻辑?
TouchCancel:在控件窗口内因为系统事件将当前所有触摸取消(如手机被锁屏、有电话呼入)
var _touchEndHandler = function (touch, event) {
var pos = touch.getLocation();
var node = this.owner;
if (node._hitTest(pos, this)) {
event.type = EventType.TOUCH_END;
}
else {
event.type = EventType.TOUCH_CANCEL;
}
event.touch = touch;
event.bubbles = true;
node.dispatchEvent(event);
};