From ae7635be17fb7226290de2a1052e689d37ca235e Mon Sep 17 00:00:00 2001 From: PP Date: Thu, 18 Nov 2021 13:47:05 +0800 Subject: [PATCH] add note for perperties on SubContextView component (#9676) --- cocos/ui/sub-context-view.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/cocos/ui/sub-context-view.ts b/cocos/ui/sub-context-view.ts index afc092e76d..22c2e6464b 100644 --- a/cocos/ui/sub-context-view.ts +++ b/cocos/ui/sub-context-view.ts @@ -73,6 +73,14 @@ import { CCObject, Texture2D } from '../core'; @requireComponent(UITransform) @menu('Miscellaneous/SubContextView') export class SubContextView extends Component { + /** + * @en Specify a reference value of canvas size for style editing in Open Data Context. + * The width and height setting of CSS style should not exceed this size, otherwise the rendered content will exceed the canvas. + * NOTE: This property is read-only at runtime. Please configure the design resolution in the Editor. + * + * @zh 为开放数据域的样式编辑指定一个画布尺寸的参考值,CSS 样式的宽高设置不应该超过这个尺寸,否则渲染的内容会超出画布。 + * 注意:该属性在运行时是只读的,请在编辑器环境下配置好设计分辨率。 + */ @tooltip('i18n:subContextView.design_size') get designResolutionSize () { return this._designResolutionSize; @@ -84,6 +92,11 @@ export class SubContextView extends Component { this._designResolutionSize.set(value); } + /** + * @en Setting frame rate in Open Data Context. + * + * @zh 设置开放数据域的渲染帧率。 + */ @tooltip('i18n:subContextView.fps') get fps () { return this._fps;