diff options
| author | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-11-08 10:28:33 +0100 |
|---|---|---|
| committer | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-11-08 10:28:33 +0100 |
| commit | 1f4616cbf9c82e4976d1f4b4c018d5e9ff83ad10 (patch) | |
| tree | 114400610f6d9708f774ac8af8954588bbf50fb3 /src/actions/topology | |
| parent | 2f71cb1c9fd3e649a1f0e6f713922a73372f064e (diff) | |
Implement room editing
Allows for rooms to be edited from the room context menu.
Fixes #24
Diffstat (limited to 'src/actions/topology')
| -rw-r--r-- | src/actions/topology/building.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/actions/topology/building.js b/src/actions/topology/building.js index 5aef2932..c6381a07 100644 --- a/src/actions/topology/building.js +++ b/src/actions/topology/building.js @@ -7,6 +7,8 @@ export const FINISH_NEW_ROOM_CONSTRUCTION = "FINISH_NEW_ROOM_CONSTRUCTION"; export const CANCEL_NEW_ROOM_CONSTRUCTION = "CANCEL_NEW_ROOM_CONSTRUCTION"; export const CANCEL_NEW_ROOM_CONSTRUCTION_SUCCEEDED = "CANCEL_NEW_ROOM_CONSTRUCTION_SUCCEEDED"; +export const START_ROOM_EDIT = "START_ROOM_EDIT"; +export const FINISH_ROOM_EDIT = "FINISH_ROOM_EDIT"; export const ADD_TILE = "ADD_TILE"; export const DELETE_TILE = "DELETE_TILE"; @@ -64,6 +66,22 @@ export function cancelNewRoomConstructionSucceeded() { }; } +export function startRoomEdit() { + return (dispatch, getState) => { + const { interactionLevel } = getState(); + dispatch({ + type: START_ROOM_EDIT, + roomId: interactionLevel.roomId + }); + }; +} + +export function finishRoomEdit() { + return { + type: FINISH_ROOM_EDIT + }; +} + export function toggleTileAtLocation(positionX, positionY) { return (dispatch, getState) => { const { objects, construction } = getState(); |
