We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.8.1
any
真实使用场景,基于label的长度,动态设置背景的宽度。 //可复现问题的代码 private onLoad(){ this.titlelabel.node.on(Node.EventType.SIZE_CHANGED, () => { this.onTextSizeChange() }); }
private onTextSizeChange(){ this.bg.node.transform.width = this.titlelabel.transform.width + 50 }
Bug 问题推演:
No response
逻辑 bug
The text was updated successfully, but these errors were encountered:
qiuguohua
No branches or pull requests
Cocos Creator version
3.8.1
System information
any
Issue description
真实使用场景,基于label的长度,动态设置背景的宽度。
//可复现问题的代码
private onLoad(){
this.titlelabel.node.on(Node.EventType.SIZE_CHANGED, () => {
this.onTextSizeChange()
});
}
Bug 问题推演:
Relevant error log output
No response
Steps to reproduce
逻辑 bug
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: