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

View file

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