Skip to content

Commit

Permalink
Use controlgroup class for routing search input fields
Browse files Browse the repository at this point in the history
  • Loading branch information
manisandro committed Dec 20, 2024
1 parent 9c32d7e commit e73bf11
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
5 changes: 2 additions & 3 deletions plugins/Routing.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import Icon from '../components/Icon';
import ResizeableWindow from '../components/ResizeableWindow';
import ButtonBar from '../components/widgets/ButtonBar';
import DateTimeInput from '../components/widgets/DateTimeInput';
import InputContainer from '../components/widgets/InputContainer';
import NumberInput from '../components/widgets/NumberInput';
import SearchWidget from '../components/widgets/SearchWidget';
import Spinner from '../components/widgets/Spinner';
Expand Down Expand Up @@ -535,7 +534,7 @@ class Routing extends React.Component {
};
renderSearchField = (entry, idx, config, removeable, placeholder = null) => {
return (
<InputContainer className="routing-search-field" key={"field" + idx}>
<div className="routing-search-field controlgroup" key={"field" + idx}>
<SearchWidget placeholder={placeholder} resultSelected={(result) => this.searchResultSelected(config, idx, result)} role="input" searchParams={this.state.searchParams} searchProviders={this.state.searchProviders} value={entry.text} />
{idx === 0 ? (
<button className="button" disabled={!this.props.locatePos} onClick={() => this.updatePoint(config, 0, this.locatePos())} role="suffix">
Expand All @@ -547,7 +546,7 @@ class Routing extends React.Component {
<Icon icon="remove" />
</button>
) : null}
</InputContainer>
</div>
);
};
renderImportButton = (config) => {
Expand Down
13 changes: 3 additions & 10 deletions plugins/style/Routing.css
Original file line number Diff line number Diff line change
Expand Up @@ -91,19 +91,12 @@ div.routing-points-commands > div.VectorLayerPicker {
}

div.routing-search-field {
display: flex;
margin-bottom: 0.25em;
width: 100%;
}

div.routing-search-field input.search-widget-input[type=text] {
border: none;
outline: none;
height: calc(2em - 2px);
}

div.routing-search-field button.button {
border-right: none;
width: 2em;
div.routing-search-field > div {
flex: 1 1 auto;
}

button.routing-compute-button {
Expand Down

0 comments on commit e73bf11

Please sign in to comment.