調査アンケート: Blockly のご利用体験についてお聞かせください
アンケートを開始
要素
測定中に、ブロックは重複しない要素と要素スペーサーを含む行に分割されます。
要素
要素とは、ブロック上の視覚的要素を表すものです。たとえば、以下を表す要素があります。
各要素は視覚的要素の境界を定義する長方形と、各要素の種類に固有の追加データです。
通常、要素の境界は外部クラス(つまり、要素が表すもの)によって決まります。たとえば、フィールド要素はフィールドを表し、そのサイズはフィールドの getSize
メソッドによって決まります。
要素スペーサー
要素スペーサーは、行内の要素間にある空のスペースです。
スペーサーの境界は、測定中のレンダリング情報によって決定されます。レンダリング情報は、ブロックのすべての要素を測定した後、選択されたサイズのスペースを要素間に挿入します。サイズは一貫している必要はありません。多くの場合、スペーサーの両側にある要素によってサイズが異なります。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2023-12-02 UTC。
[null,null,["最終更新日 2023-12-02 UTC。"],[[["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"]]