fix #284, when autorefresh is enabled, clear the console as well

This commit is contained in:
Cassie Tarakajian 2017-02-17 16:04:47 -05:00
parent 7b602671b9
commit 93e0ec2a73
2 changed files with 4 additions and 1 deletions

View File

@ -84,6 +84,7 @@ class Editor extends React.Component {
this.props.updateFileContent(this.props.file.name, this._cm.getValue());
if (this.props.autorefresh && this.props.isPlaying) {
this.props.startRefreshSketch();
this.props.clearConsole();
}
}, 400));
@ -296,7 +297,8 @@ Editor.propTypes = {
isExpanded: PropTypes.bool.isRequired,
collapseSidebar: PropTypes.func.isRequired,
expandSidebar: PropTypes.func.isRequired,
isUserOwner: PropTypes.bool
isUserOwner: PropTypes.bool,
clearConsole: PropTypes.func.isRequired
};
export default Editor;

View File

@ -313,6 +313,7 @@ class IDEView extends React.Component {
expandSidebar={this.props.expandSidebar}
collapseSidebar={this.props.collapseSidebar}
isUserOwner={this.isUserOwner()}
clearConsole={this.props.clearConsole}
/>
<Console
consoleEvents={this.props.console}