Skip to content

Commit

Permalink
style(geo): solve mobile issue with measure unit (#1495)
Browse files Browse the repository at this point in the history
  • Loading branch information
aziz-access authored Nov 14, 2023
1 parent 29e3265 commit ce3e4cb
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 64 deletions.
22 changes: 10 additions & 12 deletions packages/geo/src/lib/draw/draw/draw.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,16 @@
</mat-slide-toggle>

<div class="radius-unit" *ngIf="isCircle()">
<form class="radius-form">
<mat-form-field class="radius">
<input
matInput
type="number"
min="0"
placeholder="{{ 'igo.geo.spatialFilter.radius' | translate }}"
[formControl]="radiusFormControl"
[readonly]="this.freehandMode"
/>
</mat-form-field>
</form>
<mat-form-field class="radius">
<input
matInput
type="number"
min="0"
placeholder="{{ 'igo.geo.spatialFilter.radius' | translate }}"
[formControl]="radiusFormControl"
[readonly]="this.freehandMode"
/>
</mat-form-field>

<mat-form-field class="unit-field">
<mat-select
Expand Down
8 changes: 3 additions & 5 deletions packages/geo/src/lib/draw/draw/draw.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,12 @@ $slide-toggle-width: 60px;
}

.radius {
display: flex;
flex-flow: column nowrap;
width: 110%;
flex: 2;
}

.unit-field {
width: 110px;
margin-left: 30px;
flex: 1;
margin-left: 8px;
}

.radius-unit {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,16 @@
</div>

<div class="buffer-unit" *ngIf="isPolygon()">
<form class="buffer-form">
<mat-form-field class="buffer">
<input
type="number"
matInput
placeholder="{{ 'igo.geo.spatialFilter.buffer' | translate }}"
[formControl]="bufferFormControl"
[value]="0"
[readonly]="this.formControl.value === null"
/>
</mat-form-field>
</form>
<mat-form-field class="buffer">
<input
type="number"
matInput
placeholder="{{ 'igo.geo.spatialFilter.buffer' | translate }}"
[formControl]="bufferFormControl"
[value]="0"
[readonly]="this.formControl.value === null"
/>
</mat-form-field>

<mat-form-field class="unit-field">
<mat-select
Expand All @@ -62,21 +60,17 @@
</div>

<div class="radius-unit" *ngIf="isPoint()">
<form class="radius-form">
<mat-form-field class="radius">
<input
type="number"
matInput
placeholder="{{ 'igo.geo.spatialFilter.radius' | translate }}"
[formControl]="radiusFormControl"
[value]="1000"
(input)="getRadius()"
[readonly]="
this.freehandDrawIsActive && this.formControl.value === null
"
/>
</mat-form-field>
</form>
<mat-form-field class="radius">
<input
type="number"
matInput
placeholder="{{ 'igo.geo.spatialFilter.radius' | translate }}"
[formControl]="radiusFormControl"
[value]="1000"
(input)="getRadius()"
[readonly]="this.freehandDrawIsActive && this.formControl.value === null"
/>
</mat-form-field>

<mat-form-field class="unit-field">
<mat-select
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,13 @@ $slide-toggle-width: 60px;

.radius,
.buffer {
display: flex;
flex-flow: column nowrap;
width: 110%;
flex: 2;
}

.unit-field {
width: 110px;
margin-left: 30px;
flex: 1;
margin-left: 8px;
}

.example-tree-invisible {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@
}

.buffer {
display: flex;
flex-flow: column nowrap;
width: 110%;
flex: 2;
}

.unit-field {
width: 110px;
margin-left: 16px;
flex: 1;
margin-left: 8px;
}
}
14 changes: 3 additions & 11 deletions packages/geo/src/lib/measure/measurer/measurer-item.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,12 @@

.measure-field {
pointer-events: none;
flex: 2;
}

.unit-field {
margin-left: 12px;

::ng-deep {
.mat-mdc-form-field-infix {
width: fit-content;
}

.mat-mdc-select-min-line {
padding-right: 8px;
}
}
margin-left: 8px;
flex: 1;
}

::ng-deep mat-form-field .mat-mdc-form-field-subscript-wrapper {
Expand Down

0 comments on commit ce3e4cb

Please sign in to comment.