Merge 2.x commits (#7600)

This commit is contained in:
pandamicro
2020-10-27 09:13:33 +08:00
committed by GitHub
parent 4262bf097a
commit 983b994e43
4 changed files with 5 additions and 17 deletions
@@ -474,7 +474,8 @@ export class UIRenderable extends RenderableComponent {
this.markForUpdateRenderData();
}
for (const child of this.node.children) {
for (let i = 0; i < this.node.children.length; ++i) {
let child = this.node.children[i];
const renderComp = child.getComponent(UIRenderable);
if (renderComp) {
renderComp.markForUpdateRenderData();
@@ -75,6 +75,7 @@ function error (uuid, packUuid) {
export function initPacks (packs) {
packIndices = packs;
uuidToPack = {};
for (var packUuid in packs) {
var uuids = packs[packUuid];
for (var i = 0; i < uuids.length; i++) {
-16
View File
@@ -789,14 +789,6 @@ export const sys: { [x: string]: any; } = {
}
},
/**
* Dumps rooted objects, only available in native platforms
* @private
*/
dumpRoot () {
// N/A in web
},
/**
* Restart the JS VM, only available in native platforms
* @private
@@ -805,14 +797,6 @@ export const sys: { [x: string]: any; } = {
// N/A in web
},
/**
* Clean a script in the JS VM, only available in native platforms
* @private
*/
cleanScript (jsfile) {
// N/A in web
},
/**
* @en
* Returns the safe area of the screen. If the screen is not notched, the design resolution will be returned by default.
+2
View File
@@ -611,6 +611,8 @@ export class RichText extends UIComponent {
}
}
}
// Tolerate null parent child (upgrade issue may cause this special case)
children.length = 0;
this._labelSegments.length = 0;
this._labelSegmentsCache.length = 0;