From b0b5253f66f5ba6e031f5a88dc1bef613517b3b6 Mon Sep 17 00:00:00 2001 From: Georgios Andreadis Date: Thu, 26 Jan 2017 23:26:20 +0100 Subject: Refactor remaining codebase to use 'const' --- src/scripts/views/layers/room.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/scripts/views/layers/room.ts') diff --git a/src/scripts/views/layers/room.ts b/src/scripts/views/layers/room.ts index 0e31fee0..c1989206 100644 --- a/src/scripts/views/layers/room.ts +++ b/src/scripts/views/layers/room.ts @@ -65,7 +65,7 @@ export class RoomLayer implements Layer { public addSelectedTile(tile: ITile): void { this.selectedTiles.push(tile); - let tileObject = MapView.drawRectangle(tile.position, Colors.ROOM_SELECTED, this.container); + const tileObject = MapView.drawRectangle(tile.position, Colors.ROOM_SELECTED, this.container); this.selectedTileObjects.push({ position: {x: tile.position.x, y: tile.position.y}, tileObject: tileObject @@ -84,7 +84,7 @@ export class RoomLayer implements Layer { * @param objectIndex The index of the tile in the selectedTileObjects array */ public removeSelectedTile(position: IGridPosition, objectIndex: number): void { - let index = Util.tileListPositionIndexOf(this.selectedTiles, position); + const index = Util.tileListPositionIndexOf(this.selectedTiles, position); // Check whether the given position doesn't belong to an already removed tile if (index === -1) { @@ -174,4 +174,4 @@ export class RoomLayer implements Layer { tileObj.tileObject.cursor = value ? "pointer" : "default"; }); } -} \ No newline at end of file +} -- cgit v1.2.3