[zelos] Multi-line rendering (#3501)

* Add isMultiRow property and computation for padding with multirow blocks.
This commit is contained in:
Sam El-Husseini
2019-12-11 14:12:36 -08:00
committed by GitHub
parent 78e2fb2f4b
commit bb5939f77c
2 changed files with 58 additions and 5 deletions

View File

@@ -138,6 +138,13 @@ Blockly.blockRendering.RenderInfo = function(renderer, block) {
*/
this.rows = [];
/**
* The total number of input rows added onto the block.
* @type {number}
* @protected
*/
this.inputRowNum_ = 1;
/**
* An array of measurable objects containing hidden icons.
* @type {!Array.<!Blockly.blockRendering.Icon>}
@@ -224,6 +231,7 @@ Blockly.blockRendering.RenderInfo.prototype.createRows_ = function() {
// Finish this row and create a new one.
this.rows.push(activeRow);
activeRow = new Blockly.blockRendering.InputRow(this.constants_);
this.inputRowNum_ ++;
}
// All of the fields in an input go on the same row.