mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 15:52:40 +08:00
Merge pull request #1793 from knoxHuang/v1.5_Temp
fix CCRichText event for fireball/issues/5226
This commit is contained in:
@@ -213,12 +213,14 @@ var RichText = cc.Class({
|
||||
VerticalAlign: VerticalAlign
|
||||
},
|
||||
|
||||
__preload: function () {
|
||||
onEnable: function () {
|
||||
this._super();
|
||||
this.node.on(cc.Node.EventType.TOUCH_END, this._onTouchEnded, this);
|
||||
},
|
||||
|
||||
if (!CC_EDITOR) {
|
||||
this._registerEvents();
|
||||
}
|
||||
onDisable: function () {
|
||||
this._super();
|
||||
this.node.off(cc.Node.EventType.TOUCH_END, this._onTouchEnded, this);
|
||||
},
|
||||
|
||||
_createSgNode: function () {
|
||||
@@ -321,10 +323,6 @@ var RichText = cc.Class({
|
||||
return cc.rectContainsPoint(myRect, point);
|
||||
},
|
||||
|
||||
_registerEvents: function () {
|
||||
this.node.on(cc.Node.EventType.TOUCH_END, this._onTouchEnded, this);
|
||||
},
|
||||
|
||||
_resetState: function () {
|
||||
var sgNode = this._sgNode;
|
||||
if(sgNode) {
|
||||
|
||||
Reference in New Issue
Block a user