mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 07:42:38 +08:00
Merge pull request #559 from zilongshanren/fix-button-click-event-args
fix button missing event arg
This commit is contained in:
@@ -389,11 +389,11 @@ var Button = cc.Class({
|
||||
this._applyTransition(color, sprite);
|
||||
},
|
||||
|
||||
_onTouchEnded: function () {
|
||||
_onTouchEnded: function (event) {
|
||||
if (!this.interactable || !this.enabledInHierarchy) return;
|
||||
|
||||
if (this._pressed) {
|
||||
cc.Component.EventHandler.emitEvents(this.clickEvents);
|
||||
cc.Component.EventHandler.emitEvents(this.clickEvents, event);
|
||||
}
|
||||
this._pressed = false;
|
||||
this._updateState();
|
||||
|
||||
Reference in New Issue
Block a user