diff options
| author | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-09-07 19:27:13 +0200 |
|---|---|---|
| committer | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-09-23 10:05:58 +0200 |
| commit | 8218c3d3c21bfa7c4f3ee4872722b9b1261576fb (patch) | |
| tree | 16b8d0b8813aed0c846310a3fa4a01bd8ad18c60 /src/reducers/interaction-level.js | |
| parent | a7d2ac48224c4226003d67f77143738cc72aa016 (diff) | |
Add machine mode with title and delete options
Diffstat (limited to 'src/reducers/interaction-level.js')
| -rw-r--r-- | src/reducers/interaction-level.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/reducers/interaction-level.js b/src/reducers/interaction-level.js index b6287aac..a3f3de7f 100644 --- a/src/reducers/interaction-level.js +++ b/src/reducers/interaction-level.js @@ -1,6 +1,7 @@ import { GO_DOWN_ONE_INTERACTION_LEVEL, GO_FROM_BUILDING_TO_ROOM, + GO_FROM_RACK_TO_MACHINE, GO_FROM_ROOM_TO_RACK } from "../actions/interaction-level"; @@ -17,6 +18,13 @@ export function interactionLevel(state = {mode: "BUILDING"}, action) { roomId: state.roomId, tileId: action.tileId }; + case GO_FROM_RACK_TO_MACHINE: + return { + mode: "MACHINE", + roomId: state.roomId, + tileId: state.tileId, + position: action.position, + }; case GO_DOWN_ONE_INTERACTION_LEVEL: if (state.mode === "ROOM") { return { @@ -27,6 +35,12 @@ export function interactionLevel(state = {mode: "BUILDING"}, action) { mode: "ROOM", roomId: state.roomId }; + } else if (state.mode === "MACHINE") { + return { + mode: "RACK", + roomId: state.roomId, + tileId: state.tileId + }; } else { return state; } |
