summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgios Andreadis <G.Andreadis@student.tudelft.nl>2017-11-03 15:33:23 +0100
committerGitHub <noreply@github.com>2017-11-03 15:33:23 +0100
commit9676913164c9c374a3b350c47346b02545c9e104 (patch)
treee9c3f947e76ddb63d51ea495a1c3d0ca95cfceab
parente0a6e9550dd6c56c1eb97b3695c9e3e539f32a13 (diff)
parentf4fb3fae6366b380fe5f709ec3b6413dcafed4d5 (diff)
Merge pull request #51 from atlarge-research/bug/47/rack-construction-exit
Disable rack construction when leaving room
-rw-r--r--src/reducers/construction-mode.js11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/reducers/construction-mode.js b/src/reducers/construction-mode.js
index 4778bd44..c4c0c010 100644
--- a/src/reducers/construction-mode.js
+++ b/src/reducers/construction-mode.js
@@ -1,14 +1,12 @@
-import { combineReducers } from "redux";
-import { OPEN_EXPERIMENT_SUCCEEDED } from "../actions/experiments";
+import {combineReducers} from "redux";
+import {OPEN_EXPERIMENT_SUCCEEDED} from "../actions/experiments";
+import {GO_DOWN_ONE_INTERACTION_LEVEL} from "../actions/interaction-level";
import {
CANCEL_NEW_ROOM_CONSTRUCTION_SUCCEEDED,
FINISH_NEW_ROOM_CONSTRUCTION,
START_NEW_ROOM_CONSTRUCTION_SUCCEEDED
} from "../actions/topology/building";
-import {
- START_RACK_CONSTRUCTION,
- STOP_RACK_CONSTRUCTION
-} from "../actions/topology/room";
+import {START_RACK_CONSTRUCTION, STOP_RACK_CONSTRUCTION} from "../actions/topology/room";
export function currentRoomInConstruction(state = -1, action) {
switch (action.type) {
@@ -29,6 +27,7 @@ export function inRackConstructionMode(state = false, action) {
return true;
case STOP_RACK_CONSTRUCTION:
case OPEN_EXPERIMENT_SUCCEEDED:
+ case GO_DOWN_ONE_INTERACTION_LEVEL:
return false;
default:
return state;