[engine] [cocos2d-x] [jsb-adapter] 适配引擎 v2.4.10 版本

This commit is contained in:
SmallMain
2022-10-01 17:51:47 +08:00
parent 0740917436
commit e2077e59b5
31 changed files with 200 additions and 141 deletions

View File

@@ -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.

View File

@@ -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();
}