diff options
| author | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-10-04 22:49:07 +0200 |
|---|---|---|
| committer | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-10-04 22:49:25 +0200 |
| commit | 751a9ef3a12c952fe179f256d854d0c4aa37e28e (patch) | |
| tree | 241fc22c592a277526e73cc70ea0f95d5a8a7b29 /src/reducers/map.js | |
| parent | 9257d89ec2e22b65ffecc7dc7cf67b7a74c34d60 (diff) | |
Apply prettier to codebase
Diffstat (limited to 'src/reducers/map.js')
| -rw-r--r-- | src/reducers/map.js | 54 |
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 }); |
