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:
@@ -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' />
|
||||
|
||||
Reference in New Issue
Block a user