研究调查问卷:请告诉我们您使用 Blockly 的体验
开始调查问卷
元素
在测量期间,该块会拆分为多行,其中包含不重叠的元素和元素分隔符。
元素
元素表示块上的可视内容。示例包括表示以下内容的元素:
每个元素都是一个用于定义视觉内容的边界的矩形,以及特定于每种元素的一些额外数据。
元素的边界通常由某些外部类(即它们所表示的事物)决定。例如,字段元素表示字段,其大小由字段的 getSize
方法确定。
元素分隔符
元素分隔符是一行元素之间的空白空间。
分隔符的边界由测量期间的渲染信息决定。在测量代码块的所有元素后,渲染信息会在元素之间插入所选大小的空格。尺寸不必保持一致;尺寸通常因分隔符任一侧的元素而异。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2023-12-02。
[null,null,["最后更新时间 (UTC):2023-12-02。"],[[["During the measurement phase, a block is deconstructed into rows comprising elements and element spacers for rendering purposes."],["Elements represent the visual components of a block, including fields, icons, connections, and corners, with their size usually determined by the element they represent."],["Element spacers are empty spaces inserted between elements to control the spacing and visual layout of the block."]]],["During the measurement phase, blocks are divided into rows with elements and spacers. Elements, such as fields, icons, connections, and corners, are represented by rectangles with specific data. Their sizes are dictated by external classes, like a field's `getSize` method. Element spacers are empty spaces inserted between elements by the render info, with varying sizes based on the adjacent elements. The render info determines spacer sizes after measuring all block elements.\n"]]