Skip to content

Commit

Permalink
Merge branch 'master' into f-remove-unnecessary-api-calls-when-loadin…
Browse files Browse the repository at this point in the history
…g-chart
  • Loading branch information
akmal-deriv committed Apr 19, 2023
2 parents 0b23e00 + 1edc066 commit 244d245
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/bot-skeleton/src/scratch/hooks/workspace_svg.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ Blockly.WorkspaceSvg.prototype.cleanUp = function (x = 0, y = 0, blocks_to_clean
const start = (column_index - 1) * blocks_per_column;
const fat_neighbour_block = root_blocks
.slice(start, start + blocks_per_column)
.reduce((a, b) => (a.getHeightWidth().width > b.getHeightWidth().width ? a : b), null);
?.reduce((a, b) => (a.getHeightWidth().width > b.getHeightWidth().width ? a : b));

let position_x = cursor_x + fat_neighbour_block.getHeightWidth().width + Blockly.BlockSvg.MIN_BLOCK_X;
if (!is_import) {
Expand All @@ -166,7 +166,7 @@ Blockly.WorkspaceSvg.prototype.cleanUp = function (x = 0, y = 0, blocks_to_clean
const a_metrics = a.getRelativeToSurfaceXY().y + a.getHeightWidth().height;
const b_metrics = b.getRelativeToSurfaceXY().y + b.getHeightWidth().height;
return a_metrics > b_metrics ? a : b;
}, null);
});

original_cursor_y =
lowest_root_block.getRelativeToSurfaceXY().y +
Expand Down

0 comments on commit 244d245

Please sign in to comment.