Skip to content

Commit 6815b62

Browse files
authored
make blocks not run away from branched reporter
1 parent 7693064 commit 6815b62

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

core/block_render.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1902,12 +1902,9 @@ Blockly.BlockSvg.prototype.positionNewBlock = function(newBlock, newConnection,
19021902
if (newConnection.type == Blockly.NEXT_STATEMENT) {
19031903
var dx = existingConnection.x_ - newConnection.x_;
19041904
var dy = existingConnection.y_ - newConnection.y_;
1905-
1906-
var paddedOffset = newConnection.sourceBlock_.outputLeftPadding_();
1907-
if (paddedOffset) {
1905+
if (newConnection.sourceBlock_.edgeShape_) {
19081906
var bounds = existingConnection.sourceBlock_.getBoundingRectangle();
1909-
dx += ((bounds.bottomRight.y - bounds.topLeft.y) / -2) - paddedOffset
1910-
- (Blockly.BlockSvg.SEP_SPACE_X * -1.75);
1907+
dx += ((bounds.bottomRight.y - bounds.topLeft.y) / -2) + 6 * Blockly.BlockSvg.GRID_UNIT;
19111908
}
19121909

19131910
newBlock.moveBy(dx, dy);

0 commit comments

Comments
 (0)