Skip to content

Commit

Permalink
chore: rm unused disputed-border + unused method
Browse files Browse the repository at this point in the history
  • Loading branch information
jannisvisser committed Jan 31, 2025
1 parent 5fdf7a1 commit ae4aba4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 54 deletions.
36 changes: 0 additions & 36 deletions interfaces/IBF-dashboard/src/app/components/map/map.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -741,42 +741,6 @@ export class MapComponent implements AfterViewInit, OnDestroy {
);
}

private createDefaultPopupAdminRegions(
activeAggregateLayer: IbfLayer,
feature,
): string {
feature = activeAggregateLayer.data?.features.find(
(f) => f.properties?.['placeCode'] === feature.properties.placeCode,
);
return (
'<strong>' +
feature.properties.name +
(feature.properties.placeCode.includes('Disputed')
? ' (Disputed borders)'
: '') +
'</strong>' +
(feature.properties.nameParent
? ` (${feature.properties.nameParent})`
: '') +
'<br/>' +
(!activeAggregateLayer
? ''
: activeAggregateLayer.label +
': ' +
this.numberFormat(
typeof feature.properties[activeAggregateLayer.colorProperty] !==
'undefined'
? feature.properties[activeAggregateLayer.colorProperty]
: feature.properties.indicators[
activeAggregateLayer.colorProperty
],
activeAggregateLayer,
) +
' ' +
(activeAggregateLayer.unit || ''))
);
}

private createAdminRegionsLayer(layer: IbfLayer): GeoJSON {
if (!layer.data) {
return;
Expand Down
20 changes: 2 additions & 18 deletions interfaces/IBF-dashboard/src/app/services/map.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,6 @@ export class MapService {
public layers = [] as IbfLayer[];
private triggeredAreaColor = 'var(--ion-color-ibf-outline-red)';
private nonTriggeredAreaColor = 'var(--ion-color-ibf-no-alert-primary)';
private disputedBorderStyle: {
weight: number;
dashArray: string;
color: string;
} = {
weight: 2,
dashArray: '5 5',
color: null,
};
private layerDataCache: Record<string, GeoJSON.FeatureCollection> = {};

public state = {
Expand Down Expand Up @@ -934,20 +925,13 @@ export class MapService {
colorThreshold,
);
const fillOpacity = this.getAdminRegionFillOpacity(layer);
let weight = this.getAdminRegionWeight(layer, placeCode);
let color = this.getAdminRegionColor(layer);
let dashArray: string;
if (placeCode?.includes('Disputed')) {
dashArray = this.disputedBorderStyle.dashArray;
weight = this.disputedBorderStyle.weight;
color = this.disputedBorderStyle.color;
}
const weight = this.getAdminRegionWeight(layer, placeCode);
const color = this.getAdminRegionColor(layer);
return {
fillColor,
fillOpacity,
weight,
color,
dashArray,
};
}
};
Expand Down

0 comments on commit ae4aba4

Please sign in to comment.