mirror of
https://github.com/google/blockly.git
synced 2026-01-08 17:40:09 +01:00
Fix #3228 by only using the dark path offset in Geras.
This commit is contained in:
@@ -309,7 +309,7 @@ Blockly.blockRendering.RenderInfo.prototype.populateBottomRow_ = function() {
|
||||
if (followsStatement) {
|
||||
this.bottomRow.minHeight = this.constants_.LARGE_PADDING;
|
||||
} else {
|
||||
this.bottomRow.minHeight = this.constants_.MEDIUM_PADDING - 1;
|
||||
this.bottomRow.minHeight = this.constants_.MEDIUM_PADDING;
|
||||
}
|
||||
|
||||
var leftSquareCorner = this.bottomRow.hasLeftSquareCorner(this.block_);
|
||||
|
||||
@@ -73,6 +73,28 @@ Blockly.geras.RenderInfo.prototype.getRenderer = function() {
|
||||
return /** @type {!Blockly.geras.Renderer} */ (this.renderer_);
|
||||
};
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
Blockly.geras.RenderInfo.prototype.populateBottomRow_ = function() {
|
||||
Blockly.geras.RenderInfo.superClass_.populateBottomRow_.call(this);
|
||||
|
||||
var followsStatement =
|
||||
this.block_.inputList.length &&
|
||||
this.block_.inputList[this.block_.inputList.length - 1]
|
||||
.type == Blockly.NEXT_STATEMENT;
|
||||
|
||||
// The minimum height of the bottom row is smaller in Geras than in other
|
||||
// renderers, because the dark path adds a pixel.
|
||||
// If one of the row's elements has a greater height this will be overwritten
|
||||
// in the compute pass.
|
||||
if (!followsStatement) {
|
||||
this.bottomRow.minHeight =
|
||||
this.constants_.MEDIUM_PADDING - this.constants_.DARK_PATH_OFFSET;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
|
||||
@@ -154,7 +154,8 @@ Blockly.blockRendering.ExternalValueInput = function(constants, input) {
|
||||
this.height = this.shape.height;
|
||||
} else {
|
||||
this.height =
|
||||
this.connectedBlockHeight - 2 * this.constants_.TAB_OFFSET_FROM_TOP;
|
||||
this.connectedBlockHeight - this.constants_.TAB_OFFSET_FROM_TOP -
|
||||
this.constants_.MEDIUM_PADDING;
|
||||
}
|
||||
this.width = this.shape.width +
|
||||
this.constants_.EXTERNAL_VALUE_INPUT_PADDING;
|
||||
|
||||
Reference in New Issue
Block a user