Skip to content

Commit

Permalink
feat(measure): allow selecting multiple measures with checkboxes
Browse files Browse the repository at this point in the history
  • Loading branch information
cbourget committed Mar 14, 2019
1 parent 5cfe6ac commit fd4158f
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 22 deletions.
32 changes: 16 additions & 16 deletions packages/geo/src/lib/measure/measurer/measurer.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,23 +55,23 @@
</igo-measurer-item>
</ng-container>

<mat-divider></mat-divider>
<div class="measure-store-buttons">
<button
mat-icon-button
[matTooltip]="'igo.geo.measure.actionbar.calculate.tooltip' | translate"
[disabled]="(selectedFeatures$ | async).length === 0"
(click)="onCalculateClick()">
<mat-icon>playlist_add</mat-icon>
</button>

<button
mat-icon-button
[matTooltip]="'igo.geo.measure.actionbar.calculate.tooltip' | translate"
[disabled]="(selectedFeatures$ | async).length === 0"
(click)="onCalculateClick()">
<mat-icon>playlist_add</mat-icon>
</button>

<button
mat-icon-button
[matTooltip]="'igo.geo.measure.actionbar.delete.tooltip' | translate"
[disabled]="(selectedFeatures$ | async).length === 0"
(click)="onDeleteClick()">
<mat-icon>delete</mat-icon>
</button>
<button
mat-icon-button
[matTooltip]="'igo.geo.measure.actionbar.delete.tooltip' | translate"
[disabled]="(selectedFeatures$ | async).length === 0"
(click)="onDeleteClick()">
<mat-icon>delete</mat-icon>
</button>
</div>

<igo-entity-table
#table
Expand Down
12 changes: 8 additions & 4 deletions packages/geo/src/lib/measure/measurer/measurer.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,12 @@ $slide-toggle-width: 60px;
}
}

mat-divider {
width: 160px;
text-align: center;
margin: 10px auto;
.measure-store-buttons {
width: 100%;
border-top: 1px solid #ddd;
border-bottom: 1px solid #ddd;
}

.measure-store-buttons button:first-of-type {
margin-left: 14px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export class MeasurerComponent implements OnInit, OnDestroy {
public tableTemplate: EntityTableTemplate = {
selection: true,
selectMany: true,
selectionCheckbox: true,
sort: true,
columns: [
{
Expand Down
2 changes: 0 additions & 2 deletions packages/geo/src/lib/measure/measurer/measurer.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
MatButtonToggleModule,
MatIconModule,
MatTooltipModule,
MatDividerModule,
MatFormFieldModule,
MatInputModule,
MatSelectModule,
Expand All @@ -31,7 +30,6 @@ import { MeasurerDialogComponent } from './measurer-dialog.component';
MatButtonToggleModule,
MatIconModule,
MatTooltipModule,
MatDividerModule,
MatFormFieldModule,
MatInputModule,
MatSelectModule,
Expand Down

0 comments on commit fd4158f

Please sign in to comment.