0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-18 03:32:43 +00:00

Add moveBrew and moveSource function calls

This commit is contained in:
G.Ambatte
2022-05-03 22:33:05 +12:00
parent 7034f1d2d5
commit af3a403971
2 changed files with 34 additions and 2 deletions

View File

@@ -61,18 +61,34 @@ const Snippetbar = createClass({
},
toTop : function(){
this.props.sourceJump(0);
this.props.brewJump(1);
this.props.sourceJump(1);
},
moveBrew : function(){
this.props.brewJump();
},
moveSource : function(){
this.props.sourceJump();
},
renderEditorButtons : function(){
if(!this.props.showEditButtons) return;
return <div className='editors'>
<div className={`editorTool fromBrew ${['text'].includes(this.props.view) ? 'active' : ''}`}
onClick={this.moveSource} >
<i className='fas fa-arrow-left' />
</div>
<div className={`editorTool toTop ${['text', 'style'].includes(this.props.view) ? 'active' : ''}`}
onClick={this.toTop} >
<i className='fas fa-arrow-up' />
</div>
<div className={`editorTool toBrew ${['text'].includes(this.props.view) ? 'active' : ''}`}
onClick={this.moveBrew} >
<i className='fas fa-arrow-right' />
</div>
<div className={`editorTool undo ${this.props.historySize.undo ? 'active' : ''}`}
onClick={this.props.undo} >
<i className='fas fa-undo' />