mirror of
https://github.com/smallmain/cocos-enhance-kit.git
synced 2025-09-24 08:14:36 +00:00
[engine] [cocos2d-x] [jsb-adapter] 适配引擎 v2.4.10 版本
This commit is contained in:
@@ -674,6 +674,18 @@ let Label = cc.Class({
|
||||
this._super();
|
||||
},
|
||||
|
||||
onRestore: CC_EDITOR && function () {
|
||||
// Because undo/redo will not call onEnable/onDisable,
|
||||
// we need call onEnable/onDisable manually to active/disactive children nodes.
|
||||
if (this.enabledInHierarchy) {
|
||||
this.node._renderComponent = null;
|
||||
this.onEnable();
|
||||
}
|
||||
else {
|
||||
this.onDisable();
|
||||
}
|
||||
},
|
||||
|
||||
_nodeSizeChanged () {
|
||||
// Because the content size is automatically updated when overflow is NONE.
|
||||
// And this will conflict with the alignment of the CCWidget.
|
||||
|
@@ -62,6 +62,7 @@ var MotionStreak = cc.Class({
|
||||
ctor () {
|
||||
this._points = [];
|
||||
this._lastWPos = new cc.Vec2();
|
||||
this._lastWPosUpdated = false;
|
||||
},
|
||||
|
||||
properties: {
|
||||
@@ -313,8 +314,7 @@ var MotionStreak = cc.Class({
|
||||
reset () {
|
||||
this._points.length = 0;
|
||||
this._assembler && this._assembler._renderData.clear();
|
||||
this._lastWPos.x = 0;
|
||||
this._lastWPos.y = 0;
|
||||
this._lastWPosUpdated = false;
|
||||
if (CC_EDITOR) {
|
||||
cc.engine.repaintInEditMode();
|
||||
}
|
||||
|
Reference in New Issue
Block a user