研究调查问卷:请告诉我们您使用 Blockly 的体验
开始调查问卷
blockly >字段 >getSize
Field.getSize() 方法
返回字段的高度和宽度。
*一般* 应该只有这一个位置可以调用 render_。
Signature:
getSize(): Size;
返回:
尺寸
高度和宽度。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-10-11。
[null,null,["最后更新时间 (UTC):2024-10-11。"],[[["`Field.getSize()` returns the dimensions (height and width) of a Blockly field as a `Size` object."],["This method is typically the primary location where the field's rendering logic (`render_`) is executed, determining its visual size."]]],["The `Field.getSize()` method calculates and returns the dimensions of a field. Specifically, it outputs the height and width as a `Size` object. This method is typically the primary source for invoking rendering operations. It has a simple signature, `getSize(): Size;`, and is vital for determining the space occupied by a field.\n"]]