mirror of
https://github.com/google/blockly.git
synced 2026-01-11 02:47:09 +01:00
Fix bug in zelos tight nesting code. (#3565)
This commit is contained in:
@@ -104,8 +104,7 @@ Blockly.zelos.Drawer.prototype.drawRightSideRow_ = function(row) {
|
||||
if (row.precedesStatement || row.followsStatement) {
|
||||
var cornerHeight = this.constants_.INSIDE_CORNERS.rightHeight;
|
||||
var remainingHeight = row.height -
|
||||
(row.precedesStatement ? cornerHeight : 0) -
|
||||
(row.followsStatement ? cornerHeight : 0);
|
||||
(row.precedesStatement ? cornerHeight : 0);
|
||||
this.outlinePath_ +=
|
||||
(row.followsStatement ?
|
||||
this.constants_.INSIDE_CORNERS.pathBottomRight : '') +
|
||||
|
||||
@@ -505,12 +505,15 @@ Blockly.zelos.RenderInfo.prototype.finalizeVerticalAlignment_ = function() {
|
||||
elem.connectedBlock.getHeightWidth().height >=
|
||||
MIN_VERTICAL_TIGHTNESTING_HEIGHT) {
|
||||
hasNonShadowConnectedBlocks = true;
|
||||
hasSingleTextOrImageField = false;
|
||||
break;
|
||||
} else if (Blockly.blockRendering.Types.isField(elem) &&
|
||||
(elem.field instanceof Blockly.FieldLabel ||
|
||||
elem.field instanceof Blockly.FieldImage)) {
|
||||
hasSingleTextOrImageField =
|
||||
hasSingleTextOrImageField == null ? true : false;
|
||||
} else if (!Blockly.blockRendering.Types.isSpacer(elem)) {
|
||||
hasSingleTextOrImageField = false;
|
||||
}
|
||||
}
|
||||
// Reduce the previous and next spacer's height.
|
||||
|
||||
Reference in New Issue
Block a user