summaryrefslogtreecommitdiff
path: root/src/components/app/map/groups/GridGroup.js
diff options
context:
space:
mode:
authorGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-10-04 22:49:07 +0200
committerGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-10-04 22:49:25 +0200
commit751a9ef3a12c952fe179f256d854d0c4aa37e28e (patch)
tree241fc22c592a277526e73cc70ea0f95d5a8a7b29 /src/components/app/map/groups/GridGroup.js
parent9257d89ec2e22b65ffecc7dc7cf67b7a74c34d60 (diff)
Apply prettier to codebase
Diffstat (limited to 'src/components/app/map/groups/GridGroup.js')
-rw-r--r--src/components/app/map/groups/GridGroup.js47
1 files changed, 29 insertions, 18 deletions
diff --git a/src/components/app/map/groups/GridGroup.js b/src/components/app/map/groups/GridGroup.js
index b3c6e1d5..bbb1eb68 100644
--- a/src/components/app/map/groups/GridGroup.js
+++ b/src/components/app/map/groups/GridGroup.js
@@ -1,30 +1,41 @@
import React from "react";
-import {Group, Line} from "react-konva";
-import {GRID_COLOR} from "../../../../util/colors";
-import {GRID_LINE_WIDTH_IN_PIXELS, MAP_SIZE, MAP_SIZE_IN_PIXELS, TILE_SIZE_IN_PIXELS} from "../MapConstants";
+import { Group, Line } from "react-konva";
+import { GRID_COLOR } from "../../../../util/colors";
+import {
+ GRID_LINE_WIDTH_IN_PIXELS,
+ MAP_SIZE,
+ MAP_SIZE_IN_PIXELS,
+ TILE_SIZE_IN_PIXELS
+} from "../MapConstants";
const MAP_COORDINATE_ENTRIES = Array.from(new Array(MAP_SIZE), (x, i) => i);
const HORIZONTAL_POINT_PAIRS = MAP_COORDINATE_ENTRIES.map(index => [
- 0, index * TILE_SIZE_IN_PIXELS,
- MAP_SIZE_IN_PIXELS, index * TILE_SIZE_IN_PIXELS
+ 0,
+ index * TILE_SIZE_IN_PIXELS,
+ MAP_SIZE_IN_PIXELS,
+ index * TILE_SIZE_IN_PIXELS
]);
const VERTICAL_POINT_PAIRS = MAP_COORDINATE_ENTRIES.map(index => [
- index * TILE_SIZE_IN_PIXELS, 0,
- index * TILE_SIZE_IN_PIXELS, MAP_SIZE_IN_PIXELS
+ index * TILE_SIZE_IN_PIXELS,
+ 0,
+ index * TILE_SIZE_IN_PIXELS,
+ MAP_SIZE_IN_PIXELS
]);
const GridGroup = () => (
- <Group>
- {HORIZONTAL_POINT_PAIRS.concat(VERTICAL_POINT_PAIRS).map((points, index) => (
- <Line
- key={index}
- points={points}
- stroke={GRID_COLOR}
- strokeWidth={GRID_LINE_WIDTH_IN_PIXELS}
- listening={false}
- />
- ))}
- </Group>
+ <Group>
+ {HORIZONTAL_POINT_PAIRS.concat(
+ VERTICAL_POINT_PAIRS
+ ).map((points, index) => (
+ <Line
+ key={index}
+ points={points}
+ stroke={GRID_COLOR}
+ strokeWidth={GRID_LINE_WIDTH_IN_PIXELS}
+ listening={false}
+ />
+ ))}
+ </Group>
);
export default GridGroup;