Skip to content

Commit 4013fa7

Browse files
committed
Fix draw node onEnter/onExit issue
1 parent dd4df1c commit 4013fa7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cocos2d/shape-nodes/CCDrawNode.js

+2
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,7 @@ cc.game.addEventListener(cc.game.EVENT_RENDERER_INITED, function () {
530530
},
531531

532532
onEnter: function () {
533+
cc.Node.prototype.onEnter.call(this);
533534
if (this._occupiedSize < this._bufferCapacity) {
534535
this._ensureCapacity(this._bufferCapacity);
535536
}
@@ -539,6 +540,7 @@ cc.game.addEventListener(cc.game.EVENT_RENDERER_INITED, function () {
539540
if (!this.manualRelease) {
540541
this.release();
541542
}
543+
cc.Node.prototype.onExit.call(this);
542544
},
543545

544546
release: function () {

0 commit comments

Comments
 (0)