From 2ad07f9ace395cf86342e722b0bb7552630d2195 Mon Sep 17 00:00:00 2001 From: EmeraldBlock Date: Fri, 4 Jun 2021 12:52:13 -0500 Subject: [PATCH] fix incorrect bounds with selection --- src/js/game/hud/parts/screenshot_exporter.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/js/game/hud/parts/screenshot_exporter.js b/src/js/game/hud/parts/screenshot_exporter.js index 247655c1..b5b6c4b0 100644 --- a/src/js/game/hud/parts/screenshot_exporter.js +++ b/src/js/game/hud/parts/screenshot_exporter.js @@ -67,7 +67,9 @@ export class HUDScreenshotExporter extends BaseHUDPart { const tileStart = worldStart.toTileSpace(); const tileEnd = worldEnd.toTileSpace(); - bounds = Rectangle.fromTwoPoints(tileStart, tileEnd.addScalars(1, 1)); + bounds = Rectangle.fromTwoPoints(tileStart, tileEnd); + bounds.w += 1; + bounds.h += 1; } else if (massSelector.selectedUids.size > 0) { const minTile = new Vector(Infinity, Infinity); const maxTile = new Vector(-Infinity, -Infinity);