diff options
| author | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-01-26 23:26:20 +0100 |
|---|---|---|
| committer | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-01-26 23:26:20 +0100 |
| commit | b0b5253f66f5ba6e031f5a88dc1bef613517b3b6 (patch) | |
| tree | f764e84ad48de6cb514cbc97e366c21d734e247c /src/scripts/views/layers/room.ts | |
| parent | 027b379cf9d53a12782781e586f79051461ab661 (diff) | |
Refactor remaining codebase to use 'const'
Diffstat (limited to 'src/scripts/views/layers/room.ts')
| -rw-r--r-- | src/scripts/views/layers/room.ts | 6 |
1 files changed, 3 insertions, 3 deletions
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 +} |
