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
|
||||
className="toolbar__play-sketch-button"
|
||||
onClick={() => {
|
||||
this.props.clearConsole();
|
||||
this.props.startTextOutput();
|
||||
this.props.startSketchAndRefresh();
|
||||
}}
|
||||
|
@ -69,7 +70,15 @@ class Toolbar extends React.Component {
|
|||
>
|
||||
<InlineSVG src={playUrl} alt="Play Sketch" />
|
||||
</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" />
|
||||
</button>
|
||||
<button
|
||||
|
@ -169,7 +178,8 @@ Toolbar.propTypes = {
|
|||
setAutorefresh: PropTypes.func.isRequired,
|
||||
startSketchAndRefresh: PropTypes.func.isRequired,
|
||||
saveProject: PropTypes.func.isRequired,
|
||||
currentUser: PropTypes.string
|
||||
currentUser: PropTypes.string,
|
||||
clearConsole: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
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))) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
this.props.clearConsole();
|
||||
this.props.startSketchAndRefresh();
|
||||
} else if (e.keyCode === 50 && ((e.metaKey && this.isMac) || (e.ctrlKey && !this.isMac)) && e.shiftKey) {
|
||||
e.preventDefault();
|
||||
|
@ -220,6 +221,7 @@ class IDEView extends React.Component {
|
|||
startSketchAndRefresh={this.props.startSketchAndRefresh}
|
||||
saveProject={this.props.saveProject}
|
||||
currentUser={this.props.user.username}
|
||||
clearConsole={this.props.clearConsole}
|
||||
/>
|
||||
<Preferences
|
||||
isVisible={this.props.ide.preferencesIsVisible}
|
||||
|
|
Loading…
Reference in a new issue