Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasneirynck committed Mar 9, 2020
1 parent 4756563 commit e7153db
Showing 1 changed file with 15 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,22 +93,28 @@ export class ColorMapSelect extends Component {
return null;
}

let colorStopEditor;
if (this.props.colorMapType === COLOR_MAP_TYPE.ORDINAL) {
return (
colorStopEditor = (
<ColorStopsOrdinal
colorStops={this.state.customColorMap}
onChange={this._onCustomColorMapChange}
/>
);
}
} else
colorStopEditor = (
<ColorStopsCategorical
colorStops={this.state.customColorMap}
field={this.props.styleProperty.getField()}
getValueSuggestions={this.props.styleProperty.getValueSuggestions}
onChange={this._onCustomColorMapChange}
/>
);

return (
<ColorStopsCategorical
colorStops={this.state.customColorMap}
field={this.props.styleProperty.getField()}
getValueSuggestions={this.props.styleProperty.getValueSuggestions}
onChange={this._onCustomColorMapChange}
/>
<EuiFlexGroup>
<EuiFlexItem>{colorStopEditor}</EuiFlexItem>
</EuiFlexGroup>
);
}

Expand Down Expand Up @@ -154,12 +160,8 @@ export class ColorMapSelect extends Component {
return (
<Fragment>
{this._renderColorMapSelections()}

<EuiSpacer size="s" />

<EuiFlexGroup>
<EuiFlexItem>{this._renderColorStopsInput()}</EuiFlexItem>
</EuiFlexGroup>
{this._renderColorStopsInput()}
</Fragment>
);
}
Expand Down

0 comments on commit e7153db

Please sign in to comment.