summaryrefslogtreecommitdiff
path: root/src/reducers/map.js
diff options
context:
space:
mode:
authorGeorgios Andreadis <G.Andreadis@student.tudelft.nl>2017-10-04 23:23:09 +0200
committerGitHub <noreply@github.com>2017-10-04 23:23:09 +0200
commitfcaaae65d34003874c76e0c01134dedf94248e09 (patch)
tree2aae1422168651e832a1904623f6f5b100fc17ec /src/reducers/map.js
parent0a62dfb55c5700013d42a589b930c7448e5bff71 (diff)
parent606d1de0be09f3597165248f65d54e158a13860c (diff)
Merge pull request #42 from atlarge-research/auto-reformat
Standardize code format
Diffstat (limited to 'src/reducers/map.js')
-rw-r--r--src/reducers/map.js54
1 files changed, 29 insertions, 25 deletions
diff --git a/src/reducers/map.js b/src/reducers/map.js
index c36916b6..b75dc051 100644
--- a/src/reducers/map.js
+++ b/src/reducers/map.js
@@ -1,35 +1,39 @@
-import {combineReducers} from "redux";
-import {SET_MAP_DIMENSIONS, SET_MAP_POSITION, SET_MAP_SCALE} from "../actions/map";
+import { combineReducers } from "redux";
+import {
+ SET_MAP_DIMENSIONS,
+ SET_MAP_POSITION,
+ SET_MAP_SCALE
+} from "../actions/map";
-export function position(state = {x: 0, y: 0}, action) {
- switch (action.type) {
- case SET_MAP_POSITION:
- return {x: action.x, y: action.y};
- default:
- return state;
- }
+export function position(state = { x: 0, y: 0 }, action) {
+ switch (action.type) {
+ case SET_MAP_POSITION:
+ return { x: action.x, y: action.y };
+ default:
+ return state;
+ }
}
-export function dimensions(state = {width: 600, height: 400}, action) {
- switch (action.type) {
- case SET_MAP_DIMENSIONS:
- return {width: action.width, height: action.height};
- default:
- return state;
- }
+export function dimensions(state = { width: 600, height: 400 }, action) {
+ switch (action.type) {
+ case SET_MAP_DIMENSIONS:
+ return { width: action.width, height: action.height };
+ default:
+ return state;
+ }
}
export function scale(state = 1, action) {
- switch (action.type) {
- case SET_MAP_SCALE:
- return action.scale;
- default:
- return state;
- }
+ switch (action.type) {
+ case SET_MAP_SCALE:
+ return action.scale;
+ default:
+ return state;
+ }
}
export const map = combineReducers({
- position,
- dimensions,
- scale
+ position,
+ dimensions,
+ scale
});