summaryrefslogtreecommitdiff
path: root/src/scripts/views/layers/dcprogressbar.ts
diff options
context:
space:
mode:
authorGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-01-26 23:26:20 +0100
committerGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-01-26 23:26:20 +0100
commitb0b5253f66f5ba6e031f5a88dc1bef613517b3b6 (patch)
treef764e84ad48de6cb514cbc97e366c21d734e247c /src/scripts/views/layers/dcprogressbar.ts
parent027b379cf9d53a12782781e586f79051461ab661 (diff)
Refactor remaining codebase to use 'const'
Diffstat (limited to 'src/scripts/views/layers/dcprogressbar.ts')
-rw-r--r--src/scripts/views/layers/dcprogressbar.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/scripts/views/layers/dcprogressbar.ts b/src/scripts/views/layers/dcprogressbar.ts
index d0ec4397..e518ead4 100644
--- a/src/scripts/views/layers/dcprogressbar.ts
+++ b/src/scripts/views/layers/dcprogressbar.ts
@@ -30,7 +30,7 @@ export class DCProgressBar {
public static drawItemProgressRectangle(position: IGridPosition, color: string,
container: createjs.Container, distanceFromBottom: number,
fractionFilled: number): createjs.Shape {
- let shape = new createjs.Shape();
+ const shape = new createjs.Shape();
shape.graphics.beginFill(color);
let x = position.x * CELL_SIZE + DCObjectLayer.ITEM_MARGIN + DCObjectLayer.ITEM_PADDING;
let y = (position.y + 1) * CELL_SIZE - DCObjectLayer.ITEM_MARGIN - DCObjectLayer.ITEM_PADDING -
@@ -67,7 +67,7 @@ export class DCProgressBar {
*/
public static drawProgressbarIcon(position: IGridPosition, container: createjs.Container, originBitmap: createjs.Bitmap,
distanceFromBottom: number): createjs.Bitmap {
- let bitmap = originBitmap.clone();
+ const bitmap = originBitmap.clone();
container.addChild(bitmap);
bitmap.x = (position.x + 0.5) * CELL_SIZE - DCProgressBar.PROGRESS_BAR_WIDTH * 0.5;
bitmap.y = (position.y + 1) * CELL_SIZE - DCObjectLayer.ITEM_MARGIN - DCObjectLayer.ITEM_PADDING -
@@ -96,4 +96,4 @@ export class DCProgressBar {
DCProgressBar.drawProgressbarIcon(this.position, this.container, this.bitmap, this.distanceFromBottom);
}
-} \ No newline at end of file
+}