diff options
| author | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-09-11 11:53:06 +0200 |
|---|---|---|
| committer | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-09-23 10:06:00 +0200 |
| commit | aa448cb5c3e2e372dad1c79ffc32ff32144b4140 (patch) | |
| tree | 19f6cff07ca75f541d543ca5e0eb65c50b8e93b8 /src/actions/map.js | |
| parent | 8bd2bc91cc7e97f233031a42ccfda92af5e8bb96 (diff) | |
Move zoom level and map position info to store
Diffstat (limited to 'src/actions/map.js')
| -rw-r--r-- | src/actions/map.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/actions/map.js b/src/actions/map.js new file mode 100644 index 00000000..ef691873 --- /dev/null +++ b/src/actions/map.js @@ -0,0 +1,26 @@ +export const SET_MAP_POSITION = "SET_MAP_POSITION"; +export const SET_MAP_DIMENSIONS = "SET_MAP_DIMENSIONS"; +export const SET_MAP_SCALE = "SET_MAP_SCALE"; + +export function setMapPosition(x, y) { + return { + type: SET_MAP_POSITION, + x, + y + }; +} + +export function setMapDimensions(width, height) { + return { + type: SET_MAP_DIMENSIONS, + width, + height + }; +} + +export function setMapScale(scale) { + return { + type: SET_MAP_SCALE, + scale + }; +} |
