fix #284
This commit is contained in:
parent
509bb6bd8e
commit
ad62d20544
2 changed files with 14 additions and 2 deletions
|
@ -61,6 +61,7 @@ class Toolbar extends React.Component {
|
||||||
<button
|
<button
|
||||||
className="toolbar__play-sketch-button"
|
className="toolbar__play-sketch-button"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
this.props.clearConsole();
|
||||||
this.props.startTextOutput();
|
this.props.startTextOutput();
|
||||||
this.props.startSketchAndRefresh();
|
this.props.startSketchAndRefresh();
|
||||||
}}
|
}}
|
||||||
|
@ -69,7 +70,15 @@ class Toolbar extends React.Component {
|
||||||
>
|
>
|
||||||
<InlineSVG src={playUrl} alt="Play Sketch" />
|
<InlineSVG src={playUrl} alt="Play Sketch" />
|
||||||
</button>
|
</button>
|
||||||
<button className={playButtonClass} onClick={this.props.startSketchAndRefresh} aria-label="play only visual sketch" disabled={this.props.infiniteLoop} >
|
<button
|
||||||
|
className={playButtonClass}
|
||||||
|
onClick={() => {
|
||||||
|
this.props.clearConsole();
|
||||||
|
this.props.startSketchAndRefresh();
|
||||||
|
}}
|
||||||
|
aria-label="play only visual sketch"
|
||||||
|
disabled={this.props.infiniteLoop}
|
||||||
|
>
|
||||||
<InlineSVG src={playUrl} alt="Play only visual Sketch" />
|
<InlineSVG src={playUrl} alt="Play only visual Sketch" />
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
|
@ -169,7 +178,8 @@ Toolbar.propTypes = {
|
||||||
setAutorefresh: PropTypes.func.isRequired,
|
setAutorefresh: PropTypes.func.isRequired,
|
||||||
startSketchAndRefresh: PropTypes.func.isRequired,
|
startSketchAndRefresh: PropTypes.func.isRequired,
|
||||||
saveProject: PropTypes.func.isRequired,
|
saveProject: PropTypes.func.isRequired,
|
||||||
currentUser: PropTypes.string
|
currentUser: PropTypes.string,
|
||||||
|
clearConsole: PropTypes.func.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Toolbar;
|
export default Toolbar;
|
||||||
|
|
|
@ -151,6 +151,7 @@ class IDEView extends React.Component {
|
||||||
} else if (e.keyCode === 13 && ((e.metaKey && this.isMac) || (e.ctrlKey && !this.isMac))) {
|
} else if (e.keyCode === 13 && ((e.metaKey && this.isMac) || (e.ctrlKey && !this.isMac))) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
|
this.props.clearConsole();
|
||||||
this.props.startSketchAndRefresh();
|
this.props.startSketchAndRefresh();
|
||||||
} else if (e.keyCode === 50 && ((e.metaKey && this.isMac) || (e.ctrlKey && !this.isMac)) && e.shiftKey) {
|
} else if (e.keyCode === 50 && ((e.metaKey && this.isMac) || (e.ctrlKey && !this.isMac)) && e.shiftKey) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
@ -220,6 +221,7 @@ class IDEView extends React.Component {
|
||||||
startSketchAndRefresh={this.props.startSketchAndRefresh}
|
startSketchAndRefresh={this.props.startSketchAndRefresh}
|
||||||
saveProject={this.props.saveProject}
|
saveProject={this.props.saveProject}
|
||||||
currentUser={this.props.user.username}
|
currentUser={this.props.user.username}
|
||||||
|
clearConsole={this.props.clearConsole}
|
||||||
/>
|
/>
|
||||||
<Preferences
|
<Preferences
|
||||||
isVisible={this.props.ide.preferencesIsVisible}
|
isVisible={this.props.ide.preferencesIsVisible}
|
||||||
|
|
Loading…
Reference in a new issue