mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-19 14:52:40 +08:00
Merge 2.x commits (#7600)
This commit is contained in:
@@ -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++) {
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user