summaryrefslogtreecommitdiff
path: root/src/actions
diff options
context:
space:
mode:
authorGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-11-10 08:53:34 +0100
committerGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-11-10 08:53:34 +0100
commit4d6532d6b642137851f9bcc1cabadbc2bd8407bd (patch)
tree62a92af663a7432d5c413763aeb44e42284906cf /src/actions
parentf28a174ea50728b7d77cc3a7f3dc7f6579ebeda2 (diff)
parentaef3e697f02806a47dec3843a071f8b5cd9980bc (diff)
Merge branch 'master' into upgrade-dependencies
# Conflicts: # src/reducers/construction-mode.js
Diffstat (limited to 'src/actions')
-rw-r--r--src/actions/topology/building.js18
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();