Tweak margins to realign

This commit is contained in:
Lukas Martinelli 2017-01-09 21:39:35 +01:00
parent e19a41d015
commit c09ffc9d41
2 changed files with 9 additions and 9 deletions

View file

@ -98,12 +98,12 @@ export default class ZoomSpecField extends React.Component {
const zoomFields = this.props.value.stops.map((stop, idx) => { const zoomFields = this.props.value.stops.map((stop, idx) => {
label = <DocLabel label = <DocLabel
doc={this.props.fieldSpec.doc} doc={this.props.fieldSpec.doc}
style={{ width: '42.5%'}} style={{ width: '41%'}}
label={idx > 0 ? "" : labelFromFieldName(this.props.fieldName)} label={idx > 0 ? "" : labelFromFieldName(this.props.fieldName)}
/> />
if(idx === 1) { if(idx === 1) {
label = <label style={{...input.label, width: '42.5%'}}> label = <label style={{...input.label, width: '41%'}}>
<Button <Button
style={{fontSize: fontSizes[5]}} style={{fontSize: fontSizes[5]}}
onClick={this.addStop.bind(this)} onClick={this.addStop.bind(this)}
@ -130,7 +130,7 @@ export default class ZoomSpecField extends React.Component {
</Button> </Button>
<NumberInput <NumberInput
style={{ style={{
width: '7%', width: '7.5%'
}} }}
value={zoomLevel} value={zoomLevel}
onChange={changedStop => this.changeStop(idx, changedStop, value)} onChange={changedStop => this.changeStop(idx, changedStop, value)}
@ -143,8 +143,8 @@ export default class ZoomSpecField extends React.Component {
value={value} value={value}
onChange={(_, newValue) => this.changeStop(idx, zoomLevel, newValue)} onChange={(_, newValue) => this.changeStop(idx, zoomLevel, newValue)}
style={{ style={{
width: '42%', width: '41%',
marginLeft: margins[0], marginLeft: '1.5%',
}} }}
/> />
</div> </div>
@ -164,7 +164,7 @@ export default class ZoomSpecField extends React.Component {
label={labelFromFieldName(this.props.fieldName)} label={labelFromFieldName(this.props.fieldName)}
doc={this.props.fieldSpec.doc} doc={this.props.fieldSpec.doc}
style={{ style={{
width: this.props.fieldSpec['zoom-function'] ? '42.25%' : '50%', width: this.props.fieldSpec['zoom-function'] ? '41%' : '50%',
}} }}
/> />
{this.props.fieldSpec['zoom-function'] && {this.props.fieldSpec['zoom-function'] &&
@ -175,7 +175,7 @@ export default class ZoomSpecField extends React.Component {
<FunctionIcon /> <FunctionIcon />
</Button> </Button>
} }
<SpecField {...this.props} style={{ width: '47%' } }/> <SpecField {...this.props} style={{ width: '50%' } }/>
</div> </div>
} }
} }

View file

@ -28,8 +28,8 @@ class ArrayInput extends React.Component {
render() { render() {
const commonStyle = { const commonStyle = {
width: '49%', width: '48%',
marginRight: '1%', marginRight: '2%',
} }
const inputs = this.values.map((v, i) => { const inputs = this.values.map((v, i) => {
if(this.props.type === 'number') { if(this.props.type === 'number') {