Skip to content

Commit

Permalink
Change on to addListener
Browse files Browse the repository at this point in the history
  • Loading branch information
paulkaplan committed Mar 27, 2017
1 parent 4b38eb1 commit 7ad841d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions src/containers/blocks.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ class Blocks extends React.Component {
.getFlyout()
.getWorkspace()
.addChangeListener(this.props.vm.flyoutBlockListener);
this.props.vm.on('SCRIPT_GLOW_ON', this.onScriptGlowOn);
this.props.vm.on('SCRIPT_GLOW_OFF', this.onScriptGlowOff);
this.props.vm.on('BLOCK_GLOW_ON', this.onBlockGlowOn);
this.props.vm.on('BLOCK_GLOW_OFF', this.onBlockGlowOff);
this.props.vm.on('VISUAL_REPORT', this.onVisualReport);
this.props.vm.on('workspaceUpdate', this.onWorkspaceUpdate);
this.props.vm.addListener('SCRIPT_GLOW_ON', this.onScriptGlowOn);
this.props.vm.addListener('SCRIPT_GLOW_OFF', this.onScriptGlowOff);
this.props.vm.addListener('BLOCK_GLOW_ON', this.onBlockGlowOn);
this.props.vm.addListener('BLOCK_GLOW_OFF', this.onBlockGlowOff);
this.props.vm.addListener('VISUAL_REPORT', this.onVisualReport);
this.props.vm.addListener('workspaceUpdate', this.onWorkspaceUpdate);
}
detachVM () {
this.props.vm.removeListener('SCRIPT_GLOW_ON', this.onScriptGlowOn);
Expand Down
4 changes: 2 additions & 2 deletions src/containers/green-flag.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ class GreenFlag extends React.Component {
this.state = {projectRunning: false};
}
componentDidMount () {
this.props.vm.on('PROJECT_RUN_START', this.onProjectRunStart);
this.props.vm.on('PROJECT_RUN_STOP', this.onProjectRunStop);
this.props.vm.addListener('PROJECT_RUN_START', this.onProjectRunStart);
this.props.vm.addListener('PROJECT_RUN_STOP', this.onProjectRunStop);
}
componentWillUnmount () {
this.props.vm.removeListener('PROJECT_RUN_START', this.onProjectRunStart);
Expand Down
4 changes: 2 additions & 2 deletions src/containers/stop-all.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ class StopAll extends React.Component {
this.state = {projectRunning: false};
}
componentDidMount () {
this.props.vm.on('PROJECT_RUN_START', this.onProjectRunStart);
this.props.vm.on('PROJECT_RUN_STOP', this.onProjectRunStop);
this.props.vm.addListener('PROJECT_RUN_START', this.onProjectRunStart);
this.props.vm.addListener('PROJECT_RUN_STOP', this.onProjectRunStop);
}
componentWillUnmount () {
this.props.vm.removeListener('PROJECT_RUN_START', this.onProjectRunStart);
Expand Down

0 comments on commit 7ad841d

Please sign in to comment.