diff --git a/demo/src/app/app.component.html b/demo/src/app/app.component.html index 855e3b99a2..66ea2c628d 100644 --- a/demo/src/app/app.component.html +++ b/demo/src/app/app.component.html @@ -38,6 +38,7 @@
+ {{'igo.geo.layer.legend.noLayersVisibleWithShowAllButton' | translate}} +
++ {{'igo.geo.layer.legend.noLayersVisibleWithShowAllButtonButZoom' | translate}} +
++ {{'igo.geo.layer.legend.noLayersVisible' | translate}} +
++ {{'igo.geo.layer.legend.noLayersVisibleButZoom' | translate}} +
diff --git a/packages/geo/src/lib/layer/layer-legend-list/layer-legend-list.component.scss b/packages/geo/src/lib/layer/layer-legend-list/layer-legend-list.component.scss new file mode 100644 index 0000000000..2b5e7017d6 --- /dev/null +++ b/packages/geo/src/lib/layer/layer-legend-list/layer-legend-list.component.scss @@ -0,0 +1,19 @@ +$slide-toggle-width: 60px; + +mat-slide-toggle { + width: 100%; + margin: 10px; + + ::ng-deep .mat-slide-toggle-content { + width: calc(100% - #{$slide-toggle-width}); + } +} + +igo-list { + display: contents; +} + +.layers-empty { + text-align: justify; + margin: 10px; +} diff --git a/packages/geo/src/lib/layer/layer-legend-list/layer-legend-list.component.ts b/packages/geo/src/lib/layer/layer-legend-list/layer-legend-list.component.ts new file mode 100644 index 0000000000..b1a75408e7 --- /dev/null +++ b/packages/geo/src/lib/layer/layer-legend-list/layer-legend-list.component.ts @@ -0,0 +1,89 @@ +import { Component, Input, ChangeDetectionStrategy, OnInit, OnDestroy, EventEmitter, Output } from '@angular/core'; +import { Layer } from '../shared'; +import { BehaviorSubject, ReplaySubject, Subscription, EMPTY, timer } from 'rxjs'; +import { debounce } from 'rxjs/operators'; + +@Component({ + selector: 'igo-layer-legend-list', + templateUrl: './layer-legend-list.component.html', + styleUrls: ['./layer-legend-list.component.scss'], + changeDetection: ChangeDetectionStrategy.OnPush +}) +export class LayerLegendListComponent implements OnInit, OnDestroy { + orderable = true; + + hasVisibleOrInRangeLayers$: BehaviorSubject{{'igo.integration.mapTool.empty' | translate}}
-+ {{'igo.integration.mapTool.empty' | translate}}
++ {{'igo.integration.mapTool.customize' | translate}}
++ {{ ((visibleLayers$ | async).length) ? ('igo.integration.mapTool.noLayersInRange' | translate) : ('igo.integration.mapTool.noLayersVisible' | translate) }} +
+ + ++ {{'igo.integration.mapTool.empty' | translate}}
++ {{'igo.integration.mapTool.customize' | translate}}
+ ++ {{ ((visibleLayers$ | async).length) ? ('igo.integration.mapTool.noLayersInRange' | translate) : ('igo.integration.mapTool.noLayersVisible' | translate) }} +
++ {{'igo.integration.mapTool.empty' | translate}}
++ {{'igo.integration.mapTool.customize' | translate}}
+ +IGO2 is a free web solution in geomatics, developed in collaborative mode by specialists from several departments and agencies of the government of Quebec.
Version :{{version.lib}}
IGO2 est une solution Web libre en géomatique, développée en mode collaboratif par des spécialistes provenant de plusieurs ministères et organismes du gouvernement du Québec.
Version :{{version.lib}}