mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-06-15 14:21:45 -04:00
Make insertion markers for define blocks have the correct width (#1781)
* Fix #1186 * Added comment to clarify which case is being handled
This commit is contained in:
parent
1465a9efe2
commit
88091d21df
1 changed files with 3 additions and 1 deletions
|
@ -1606,7 +1606,9 @@ Blockly.BlockSvg.prototype.renderDefineBlock_ = function(steps, inputRows,
|
|||
input.connection.targetBlock().getHeightWidth().width +
|
||||
Blockly.BlockSvg.DEFINE_BLOCK_PADDING_RIGHT;
|
||||
} else {
|
||||
rightSide = Blockly.BlockSvg.MIN_BLOCK_X_WITH_STATEMENT;
|
||||
// Handles the case where block is being rendered as an insertion marker
|
||||
rightSide = Math.max(Blockly.BlockSvg.MIN_BLOCK_X_WITH_STATEMENT, rightSide)
|
||||
+ Blockly.BlockSvg.DEFINE_BLOCK_PADDING_RIGHT;
|
||||
}
|
||||
rightSide -= Blockly.BlockSvg.DEFINE_HAT_CORNER_RADIUS;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue