mirror of
https://github.com/google/blockly.git
synced 2026-01-07 17:10:11 +01:00
Treat a statement input as the end of the statement row. (#3577)
* Reduce spacing for editable fields when they appear right before a statement input.
This commit is contained in:
@@ -185,8 +185,9 @@ Blockly.geras.RenderInfo.prototype.getInRowSpacing_ = function(prev, next) {
|
||||
return this.constants_.LARGE_PADDING;
|
||||
}
|
||||
|
||||
// Spacing between a non-input and the end of the row.
|
||||
if (!Blockly.blockRendering.Types.isInput(prev) && !next) {
|
||||
// Spacing between a non-input and the end of the row or a statement input.
|
||||
if (!Blockly.blockRendering.Types.isInput(prev) && (!next ||
|
||||
Blockly.blockRendering.Types.isStatementInput(next))) {
|
||||
// Between an editable field and the end of the row.
|
||||
if (Blockly.blockRendering.Types.isField(prev) && prev.isEditable) {
|
||||
return this.constants_.MEDIUM_PADDING;
|
||||
|
||||
Reference in New Issue
Block a user