From aa448cb5c3e2e372dad1c79ffc32ff32144b4140 Mon Sep 17 00:00:00 2001 From: Georgios Andreadis Date: Mon, 11 Sep 2017 11:53:06 +0200 Subject: Move zoom level and map position info to store --- src/actions/map.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/actions/map.js (limited to 'src/actions/map.js') 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 + }; +} -- cgit v1.2.3