blockly > blockRendering > RenderInfo > getSpacerRowWidth_
Método blockRendering.RenderInfo.getSpacerRowWidth_()
Calcule a largura de uma linha de espaçador.
Signature:
protected getSpacerRowWidth_(_prev: Row, _next: Row): number;
Parâmetros
Parâmetro |
Tipo |
Descrição |
_prev |
Row |
A linha antes do espaçador. |
_next |
Row |
A linha após o espaçador. |
Retorna:
number
A largura desejada da linha do espaçador entre essas duas linhas.
Exceto em caso de indicação contrária, o conteúdo desta página é licenciado de acordo com a Licença de atribuição 4.0 do Creative Commons, e as amostras de código são licenciadas de acordo com a Licença Apache 2.0. Para mais detalhes, consulte as políticas do site do Google Developers. Java é uma marca registrada da Oracle e/ou afiliadas.
Última atualização 2024-08-21 UTC.
[null,null,["Última atualização 2024-08-21 UTC."],[[["The `getSpacerRowWidth_` method calculates the width needed for a spacer row between two other rows in a Blockly block."],["This method is used internally by the Blockly rendering engine and takes the preceding and succeeding rows as input to determine the appropriate spacer width."],["The calculated width ensures proper spacing and alignment of elements within the rendered block."]]],["The `getSpacerRowWidth_` method, part of the `RenderInfo` class, calculates the width required for a spacer row. It accepts two `Row` objects, `_prev` and `_next`, representing the rows immediately before and after the spacer. The method determines and returns a numerical value representing the optimal width for the spacer row positioned between these two input rows. The output of this function is the calculated width.\n"]]