-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(geo): highlight unavailable layer in map tool
(cherry picked from commit faede586c61032b301313f0415999190d9c5b4eb)
- Loading branch information
Showing
11 changed files
with
280 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
210 changes: 126 additions & 84 deletions
210
packages/geo/src/lib/layer/layer-item/layer-item.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,92 +1,134 @@ | ||
<mat-list-item class="igo-layer-list-item"> | ||
<mat-checkbox | ||
*ngIf="selectionMode" | ||
class="layerCheck" | ||
matListItemIcon | ||
(change)="check()" | ||
[checked]="layerCheck" | ||
> | ||
</mat-checkbox> | ||
<span | ||
matListItemTitle | ||
class="igo-layer-title" | ||
[matTooltip]="tooltipText" | ||
matTooltipShowDelay="500" | ||
(click)="toggleLegendOnClick()" | ||
> | ||
{{ layer.title }} | ||
</span> | ||
|
||
<div matListItemMeta> | ||
<button | ||
*ngIf="!selectionMode" | ||
mat-icon-button | ||
[color]="layer.visible ? 'primary' : 'default'" | ||
collapsibleButton | ||
tooltip-position="below" | ||
matTooltipShowDelay="500" | ||
[matTooltip]="eyeTooltip | translate" | ||
(click)="toggleVisibility($event)" | ||
> | ||
<mat-icon | ||
aria-hidden="false" | ||
matBadge="?" | ||
matBadgeColor="accent" | ||
matBadgeSize="small" | ||
matBadgePosition="after" | ||
[matBadgeHidden]="queryBadgeHidden$ | async" | ||
[ngClass]="{ disabled: (inResolutionRange$ | async) === false }" | ||
>{{ (layer.visible$ | async) ? 'visibility' : 'visibility_off' }} | ||
</mat-icon> | ||
</button> | ||
|
||
<button | ||
<ng-container *ngIf="!unavailableLayer; else showUnavailableLayer"> | ||
<mat-list-item class="igo-layer-list-item"> | ||
<mat-checkbox | ||
*ngIf="selectionMode" | ||
class="selection-eye" | ||
mat-icon-button | ||
[color]="layer.visible ? 'primary' : 'default'" | ||
collapsibleButton | ||
tooltip-position="below" | ||
class="layerCheck" | ||
matListItemIcon | ||
(change)="check()" | ||
[checked]="layerCheck" | ||
> | ||
</mat-checkbox> | ||
<span | ||
matListItemTitle | ||
class="igo-layer-title" | ||
[matTooltip]="tooltipText" | ||
matTooltipShowDelay="500" | ||
[matTooltip]=" | ||
layer.visible | ||
? ('igo.geo.layer.hideLayer' | translate) | ||
: ('igo.geo.layer.showLayer' | translate) | ||
" | ||
(click)="toggleVisibility($event)" | ||
(click)="toggleLegendOnClick()" | ||
> | ||
<mat-icon | ||
aria-hidden="false" | ||
matBadge="?" | ||
matBadgeColor="accent" | ||
matBadgeSize="small" | ||
matBadgePosition="after" | ||
[matBadgeHidden]="queryBadgeHidden$ | async" | ||
[ngClass]="{ disabled: (inResolutionRange$ | async) === false }" | ||
>{{ layer.visible ? 'visibility' : 'visibility_off' }} | ||
</mat-icon> | ||
</button> | ||
{{ layer.title }} | ||
</span> | ||
|
||
<button | ||
*ngIf="!selectionMode" | ||
class="actions-button" | ||
tooltip-position="below" | ||
matTooltipShowDelay="500" | ||
[matTooltip]="'igo.geo.layer.moreOptions' | translate" | ||
mat-icon-button | ||
color="primary" | ||
(click)="toggleLayerTool()" | ||
<div matListItemMeta> | ||
<button | ||
*ngIf="!selectionMode" | ||
mat-icon-button | ||
[color]="layer.visible ? 'primary' : 'default'" | ||
collapsibleButton | ||
tooltip-position="below" | ||
matTooltipShowDelay="500" | ||
[matTooltip]="eyeTooltip | translate" | ||
(click)="toggleVisibility($event)" | ||
> | ||
<mat-icon | ||
aria-hidden="false" | ||
matBadge="?" | ||
matBadgeColor="accent" | ||
matBadgeSize="small" | ||
matBadgePosition="after" | ||
[matBadgeHidden]="queryBadgeHidden$ | async" | ||
[ngClass]="{ disabled: (inResolutionRange$ | async) === false }" | ||
>{{ (layer.visible$ | async) ? 'visibility' : 'visibility_off' }} | ||
</mat-icon> | ||
</button> | ||
|
||
<button | ||
*ngIf="selectionMode" | ||
class="selection-eye" | ||
mat-icon-button | ||
[color]="layer.visible ? 'primary' : 'default'" | ||
collapsibleButton | ||
tooltip-position="below" | ||
matTooltipShowDelay="500" | ||
[matTooltip]=" | ||
layer.visible | ||
? ('igo.geo.layer.hideLayer' | translate) | ||
: ('igo.geo.layer.showLayer' | translate) | ||
" | ||
(click)="toggleVisibility($event)" | ||
> | ||
<mat-icon | ||
aria-hidden="false" | ||
matBadge="?" | ||
matBadgeColor="accent" | ||
matBadgeSize="small" | ||
matBadgePosition="after" | ||
[matBadgeHidden]="queryBadgeHidden$ | async" | ||
[ngClass]="{ disabled: (inResolutionRange$ | async) === false }" | ||
>{{ layer.visible ? 'visibility' : 'visibility_off' }} | ||
</mat-icon> | ||
</button> | ||
|
||
<button | ||
*ngIf="!selectionMode" | ||
class="actions-button" | ||
tooltip-position="below" | ||
matTooltipShowDelay="500" | ||
[matTooltip]="'igo.geo.layer.moreOptions' | translate" | ||
mat-icon-button | ||
color="primary" | ||
(click)="toggleLayerTool()" | ||
> | ||
<mat-icon>more_horiz</mat-icon> | ||
</button> | ||
</div> | ||
</mat-list-item> | ||
|
||
<div #legend class="igo-layer-legend-container"> | ||
<igo-layer-legend | ||
*ngIf="showLegend$ | async" | ||
[layer]="layer" | ||
[updateLegendOnResolutionChange]="updateLegendOnResolutionChange" | ||
> | ||
<mat-icon>more_horiz</mat-icon> | ||
</button> | ||
</igo-layer-legend> | ||
</div> | ||
</mat-list-item> | ||
</ng-container> | ||
|
||
<div #legend class="igo-layer-legend-container"> | ||
<igo-layer-legend | ||
*ngIf="showLegend$ | async" | ||
[layer]="layer" | ||
[updateLegendOnResolutionChange]="updateLegendOnResolutionChange" | ||
<ng-template #showUnavailableLayer> | ||
<mat-list-item | ||
class="igo-layer-list-item unavailable-layer" | ||
*ngIf="unavailableLayerTitle" | ||
> | ||
</igo-layer-legend> | ||
</div> | ||
<span | ||
matListItemTitle | ||
class="igo-layer-title" | ||
[matTooltip]="unavailableLayerTitle" | ||
tooltip-position="below" | ||
matTooltipShowDelay="500" | ||
> | ||
{{ unavailableLayerTitle }} | ||
</span> | ||
<div matListItemMeta> | ||
<div | ||
class="align-disabled-button-with-tooltip" | ||
[matTooltip]="'igo.geo.layer.unavailableLayer' | translate" | ||
tooltip-position="below" | ||
matTooltipShowDelay="500" | ||
> | ||
<button mat-icon-button disabled="true"> | ||
<mat-icon aria-hidden="false" color="warn" svgIcon="alert-outline"> | ||
</mat-icon> | ||
</button> | ||
</div> | ||
<button | ||
mat-icon-button | ||
color="warn" | ||
[matTooltip]="'igo.geo.layer.deleteLayer' | translate" | ||
tooltip-position="below" | ||
matTooltipShowDelay="500" | ||
(click)="deleteUnavailableLayer(unavailableLayer)" | ||
> | ||
<mat-icon aria-hidden="false" svgIcon="delete"> </mat-icon> | ||
</button> | ||
</div> | ||
</mat-list-item> | ||
</ng-template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,4 +26,8 @@ | |
width: 16px; | ||
padding-right: 0px; | ||
} | ||
|
||
.align-disabled-button-with-tooltip { | ||
display: inline-block; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.