mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 08:02:39 +08:00
fix rich text render bug (#15081)
This commit is contained in:
@@ -97,6 +97,7 @@ function getSegmentByPool (type: string, content: string | SpriteFrame) {
|
||||
node = new Node(type);
|
||||
}
|
||||
node.hideFlags |= CCObject.Flags.DontSave | CCObject.Flags.HideInHierarchy;
|
||||
node.active = true; // Reset node state when use node
|
||||
if (type === RichTextChildImageName) {
|
||||
seg.comp = node.getComponent(Sprite) || node.addComponent(Sprite);
|
||||
seg.comp.spriteFrame = content as SpriteFrame;
|
||||
|
||||
Reference in New Issue
Block a user