Skip to content

Commit

Permalink
Workflow state and context enhancements
Browse files Browse the repository at this point in the history
  • Loading branch information
cheton committed Oct 4, 2017
1 parent 77514c6 commit fc49f51
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/widgets/ReactApp/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,13 @@ class App extends PureComponent {
const initialState = this.getInitialState();
this.setState({ ...initialState });
},
'workflow:state': (workflowState) => {
if (this.state.workflowState !== workflowState) {
this.setState({ workflowState: workflowState });
}
'workflow:state': (state, context) => {
this.setState({
workflow: {
state: state,
context: context
}
});
},
'controller:state': (controllerType, controllerState) => {
this.setState(state => ({
Expand Down Expand Up @@ -220,7 +223,10 @@ class App extends PureComponent {
type: controller.type,
state: controller.state
},
workflowState: controller.workflowState,
workflow: {
state: controller.workflow.state,
context: controller.workflow.context
},
machinePosition: { // Machine position
x: '0.000',
y: '0.000',
Expand Down

0 comments on commit fc49f51

Please sign in to comment.