Skip to content

Commit

Permalink
Change #off to #removeListener
Browse files Browse the repository at this point in the history
  • Loading branch information
paulkaplan committed Mar 27, 2017
1 parent 47d6cf7 commit 4b38eb1
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 @@ -64,12 +64,12 @@ class Blocks extends React.Component {
this.props.vm.on('workspaceUpdate', this.onWorkspaceUpdate);
}
detachVM () {
this.props.vm.off('SCRIPT_GLOW_ON', this.onScriptGlowOn);
this.props.vm.off('SCRIPT_GLOW_OFF', this.onScriptGlowOff);
this.props.vm.off('BLOCK_GLOW_ON', this.onBlockGlowOn);
this.props.vm.off('BLOCK_GLOW_OFF', this.onBlockGlowOff);
this.props.vm.off('VISUAL_REPORT', this.onVisualReport);
this.props.vm.off('workspaceUpdate', this.onWorkspaceUpdate);
this.props.vm.removeListener('SCRIPT_GLOW_ON', this.onScriptGlowOn);
this.props.vm.removeListener('SCRIPT_GLOW_OFF', this.onScriptGlowOff);
this.props.vm.removeListener('BLOCK_GLOW_ON', this.onBlockGlowOn);
this.props.vm.removeListener('BLOCK_GLOW_OFF', this.onBlockGlowOff);
this.props.vm.removeListener('VISUAL_REPORT', this.onVisualReport);
this.props.vm.removeListener('workspaceUpdate', this.onWorkspaceUpdate);
}
onWorkspaceMetricsChange () {
const target = this.props.vm.editingTarget;
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 @@ -20,8 +20,8 @@ class GreenFlag extends React.Component {
this.props.vm.on('PROJECT_RUN_STOP', this.onProjectRunStop);
}
componentWillUnmount () {
this.props.vm.off('PROJECT_RUN_START', this.onProjectRunStart);
this.props.vm.off('PROJECT_RUN_STOP', this.onProjectRunStop);
this.props.vm.removeListener('PROJECT_RUN_START', this.onProjectRunStart);
this.props.vm.removeListener('PROJECT_RUN_STOP', this.onProjectRunStop);
}
onProjectRunStart () {
this.setState({projectRunning: true});
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 @@ -19,8 +19,8 @@ class StopAll extends React.Component {
this.props.vm.on('PROJECT_RUN_STOP', this.onProjectRunStop);
}
componentWillUnmount () {
this.props.vm.off('PROJECT_RUN_START', this.onProjectRunStart);
this.props.vm.off('PROJECT_RUN_STOP', this.onProjectRunStop);
this.props.vm.removeListener('PROJECT_RUN_START', this.onProjectRunStart);
this.props.vm.removeListener('PROJECT_RUN_STOP', this.onProjectRunStop);
}
onProjectRunStart () {
this.setState({projectRunning: true});
Expand Down

0 comments on commit 4b38eb1

Please sign in to comment.