From f4fb3fae6366b380fe5f709ec3b6413dcafed4d5 Mon Sep 17 00:00:00 2001 From: Georgios Andreadis Date: Fri, 3 Nov 2017 15:28:39 +0100 Subject: Disable rack construction when leaving room --- src/reducers/construction-mode.js | 11 +++++------ 1 file 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; -- cgit v1.2.3