Skip to content

Commit

Permalink
a fix for coordinate editor layout on safari (#234) (#6445)
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianBruckner authored Jan 22, 2021
1 parent d652670 commit 71bc4ff
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 51 deletions.
98 changes: 51 additions & 47 deletions web/client/components/misc/coordinateeditors/CoordinatesRow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,55 +149,59 @@ class CoordinatesRow extends React.Component {
<div style={{cursor: this.props.isDraggableEnabled ? 'grab' : "not-allowed"}}>
{this.props.showDraggable ? this.props.isDraggable ? this.props.connectDragSource(dragButton) : dragButton : null}
</div>
<div className="coordinate lat">
<InputGroup>
<InputGroup.Addon><Message msgId="latitude"/></InputGroup.Addon>
<CoordinateEntry
format={this.props.format}
aeronauticalOptions={this.props.aeronauticalOptions}
coordinate="lat"
idx={idx}
value={this.state.lat}
onChange={(dd) => this.onChangeLatLon("lat", dd)}
constraints={{
decimal: {
lat: {
min: -90,
max: 90
},
lon: {
min: -180,
max: 180
<div className="coordinate">
<div>
<InputGroup>
<InputGroup.Addon><Message msgId="latitude"/></InputGroup.Addon>
<CoordinateEntry
format={this.props.format}
aeronauticalOptions={this.props.aeronauticalOptions}
coordinate="lat"
idx={idx}
value={this.state.lat}
onChange={(dd) => this.onChangeLatLon("lat", dd)}
constraints={{
decimal: {
lat: {
min: -90,
max: 90
},
lon: {
min: -180,
max: 180
}
}
}
}}
onKeyDown={this.onSubmit}
/>
</InputGroup>
<InputGroup>
<InputGroup.Addon><Message msgId="longitude"/></InputGroup.Addon>
<CoordinateEntry
format={this.props.format}
aeronauticalOptions={this.props.aeronauticalOptions}
coordinate="lon"
idx={idx}
value={this.state.lon}
onChange={(dd) => this.onChangeLatLon("lon", dd)}
constraints={{
decimal: {
lat: {
min: -90,
max: 90
},
lon: {
min: -180,
max: 180
}}
onKeyDown={this.onSubmit}
/>
</InputGroup>
</div>
<div>
<InputGroup>
<InputGroup.Addon><Message msgId="longitude"/></InputGroup.Addon>
<CoordinateEntry
format={this.props.format}
aeronauticalOptions={this.props.aeronauticalOptions}
coordinate="lon"
idx={idx}
value={this.state.lon}
onChange={(dd) => this.onChangeLatLon("lon", dd)}
constraints={{
decimal: {
lat: {
min: -90,
max: 90
},
lon: {
min: -180,
max: 180
}
}
}
}}
onKeyDown={this.onSubmit}
/>
</InputGroup>
}}
onKeyDown={this.onSubmit}
/>
</InputGroup>
</div>
</div>
{this.props.showToolButtons && <div key="tools">
<Toolbar
Expand Down
5 changes: 4 additions & 1 deletion web/client/themes/default/less/annotations.less
Original file line number Diff line number Diff line change
Expand Up @@ -462,10 +462,13 @@
flex: 1;
justify-content: space-between;
flex-wrap: wrap;
.input-group {
> div {
flex: 1;
padding: 4px 0;
margin-right: 2px;
}
.input-group {
width: 100%;
.form-group{
input#intl-numeric{
float: unset;
Expand Down
9 changes: 6 additions & 3 deletions web/client/themes/default/less/get-feature.less
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,16 @@
flex: 1 1 0%;
justify-content: space-between;
flex-wrap: wrap;
> div {
flex: 1 1 0%;
padding: 4px 0px;
margin-right: 8px;
}
.input-group {
.input-group-addon {
min-width: 45px;
}
flex: 1 1 0%;
padding: 4px 0px;
margin-right: 8px;
width: 100%;
.form-group{
width: 100%;
position: relative;
Expand Down

0 comments on commit 71bc4ff

Please sign in to comment.