summaryrefslogtreecommitdiff
path: root/frontend/src/reducers/construction-mode.js
diff options
context:
space:
mode:
authorGeorgios Andreadis <info@gandreadis.com>2020-07-03 11:50:58 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2020-08-24 19:47:23 +0200
commit8d107bd0a24fed7f553170816079fec0bcd21beb (patch)
tree6e680961367f3cedad0269a1092be830cce43e91 /frontend/src/reducers/construction-mode.js
parent0a8985a672fdc12a3cf25837635ff73fb1b0b793 (diff)
Ensure construction is ended when topology is changed
Diffstat (limited to 'frontend/src/reducers/construction-mode.js')
-rw-r--r--frontend/src/reducers/construction-mode.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/frontend/src/reducers/construction-mode.js b/frontend/src/reducers/construction-mode.js
index ac281667..fb33da72 100644
--- a/frontend/src/reducers/construction-mode.js
+++ b/frontend/src/reducers/construction-mode.js
@@ -4,7 +4,7 @@ import { GO_DOWN_ONE_INTERACTION_LEVEL } from '../actions/interaction-level'
import {
CANCEL_NEW_ROOM_CONSTRUCTION_SUCCEEDED,
FINISH_NEW_ROOM_CONSTRUCTION,
- FINISH_ROOM_EDIT,
+ FINISH_ROOM_EDIT, SET_CURRENT_TOPOLOGY,
START_NEW_ROOM_CONSTRUCTION_SUCCEEDED,
START_ROOM_EDIT,
} from '../actions/topology/building'
@@ -20,6 +20,7 @@ export function currentRoomInConstruction(state = '-1', action) {
case FINISH_NEW_ROOM_CONSTRUCTION:
case OPEN_EXPERIMENT_SUCCEEDED:
case FINISH_ROOM_EDIT:
+ case SET_CURRENT_TOPOLOGY:
case DELETE_ROOM:
return '-1'
default:
@@ -33,6 +34,7 @@ export function inRackConstructionMode(state = false, action) {
return true
case STOP_RACK_CONSTRUCTION:
case OPEN_EXPERIMENT_SUCCEEDED:
+ case SET_CURRENT_TOPOLOGY:
case GO_DOWN_ONE_INTERACTION_LEVEL:
return false
default: