Skip to content

Commit

Permalink
fix(geo): register svg icon for layer-list
Browse files Browse the repository at this point in the history
  • Loading branch information
alecarn committed Apr 16, 2024
1 parent ae2dd97 commit de1fa78
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
<mat-icon
matBadgeColor="primary"
matBadgeSize="medium"
svgIcon="magnify-scan"
[svgIcon]="magnifyIcon.name"
></mat-icon>
</button>

Expand Down Expand Up @@ -340,7 +340,7 @@
[matTooltip]="'igo.geo.layer.zoomLayers' | translate"
(click)="zoomLayersExtents(layersChecked)"
>
<mat-icon svgIcon="magnify-scan"></mat-icon>
<mat-icon [svgIcon]="magnifyIcon.name"></mat-icon>
</button>
</div>
</igo-panel>
10 changes: 8 additions & 2 deletions packages/geo/src/lib/layer/layer-list/layer-list.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { MatSliderChange, MatSliderModule } from '@angular/material/slider';
import { MatTooltipModule } from '@angular/material/tooltip';

import {
IconService,
IconSvg,
ListComponent,
ListItemDirective,
Expand Down Expand Up @@ -274,9 +275,14 @@ export class LayerListComponent implements OnInit, OnDestroy {
public selectAllCheck: boolean;
public selectAllCheck$ = new BehaviorSubject<boolean>(undefined);
private selectAllCheck$$: Subscription;
svgIcon: IconSvg = MAGNIFY_SCAN_ICON;
magnifyIcon: IconSvg = MAGNIFY_SCAN_ICON;

constructor(private elRef: ElementRef) {}
constructor(
private elRef: ElementRef,
private iconService: IconService
) {
this.iconService.registerSvg(this.magnifyIcon);
}

/**
* Subscribe to the search term stream and trigger researches
Expand Down

0 comments on commit de1fa78

Please sign in to comment.