Merge pull request #95 from paulkaplan/mode-order

Update default mode to select and mode button order
This commit is contained in:
Paul Kaplan 2017-10-24 16:29:52 -04:00 committed by GitHub
commit 706a9c101d
2 changed files with 8 additions and 7 deletions

View file

@ -186,6 +186,12 @@ class PaintEditorComponent extends React.Component {
{/* Modes */}
{this.state.canvas ? (
<div className={styles.modeSelector}>
<SelectMode
onUpdateSvg={this.props.onUpdateSvg}
/>
<ReshapeMode
onUpdateSvg={this.props.onUpdateSvg}
/>
<BrushMode
canvas={this.state.canvas}
onUpdateSvg={this.props.onUpdateSvg}
@ -198,16 +204,11 @@ class PaintEditorComponent extends React.Component {
canvas={this.state.canvas}
onUpdateSvg={this.props.onUpdateSvg}
/>
{/* Text mode will go here */}
<LineMode
canvas={this.state.canvas}
onUpdateSvg={this.props.onUpdateSvg}
/>
<SelectMode
onUpdateSvg={this.props.onUpdateSvg}
/>
<ReshapeMode
onUpdateSvg={this.props.onUpdateSvg}
/>
<OvalMode
onUpdateSvg={this.props.onUpdateSvg}
/>

View file

@ -2,7 +2,7 @@ import Modes from '../modes/modes';
import log from '../log/log';
const CHANGE_MODE = 'scratch-paint/modes/CHANGE_MODE';
const initialState = Modes.BRUSH;
const initialState = Modes.SELECT;
const reducer = function (state, action) {
if (typeof state === 'undefined') state = initialState;