mirror of
https://github.com/google/blockly.git
synced 2026-01-09 01:50:11 +01:00
Adjust zelos spacing constants (#3487)
This commit is contained in:
@@ -81,6 +81,11 @@ Blockly.zelos.ConstantProvider = function() {
|
||||
*/
|
||||
this.NOTCH_OFFSET_LEFT = 3 * this.GRID_UNIT;
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
this.MIN_BLOCK_WIDTH = 2 * this.GRID_UNIT;
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
@@ -115,7 +120,7 @@ Blockly.zelos.ConstantProvider = function() {
|
||||
* Minimum statement input spacer width.
|
||||
* @type {number}
|
||||
*/
|
||||
this.STATEMENT_INPUT_SPACER_MIN_WIDTH = 34.5 * this.GRID_UNIT;
|
||||
this.STATEMENT_INPUT_SPACER_MIN_WIDTH = 40 * this.GRID_UNIT;
|
||||
|
||||
/**
|
||||
* @override
|
||||
|
||||
@@ -191,9 +191,15 @@ Blockly.zelos.RenderInfo.prototype.getSpacerRowHeight_ = function(
|
||||
}
|
||||
// Top and bottom rows act as a spacer so we don't need any extra padding.
|
||||
if ((Blockly.blockRendering.Types.isTopRow(prev))) {
|
||||
if (!prev.hasPreviousConnection && !this.outputConnection) {
|
||||
return this.constants_.SMALL_PADDING;
|
||||
}
|
||||
return this.constants_.NO_PADDING;
|
||||
}
|
||||
if ((Blockly.blockRendering.Types.isBottomRow(next))) {
|
||||
if (!this.outputConnection) {
|
||||
return this.constants_.SMALL_PADDING;
|
||||
}
|
||||
return this.constants_.NO_PADDING;
|
||||
}
|
||||
return this.constants_.MEDIUM_PADDING;
|
||||
|
||||
Reference in New Issue
Block a user