Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AUS-3829 Disable DownloadTab when layerAdd is not ready. #206

Merged
merged 1 commit into from
Nov 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app/menupanel/layerpanel/layerpanel.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<div class="card-header">
<ul id="card-tab" class="nav nav-tabs">
<li (click)="selectTabPanel(layer.id,'filterpanel')" [ngClass]="{'active': getUILayerModel(layer.id) && getUILayerModel(layer.id).tabpanel.filterpanel.expanded}"><a data-toggle="tab"><span class="d-none d-sm-inline">Map Layer</span></a></li>
<li (click)="selectTabPanel(layer.id,'downloadpanel')" [ngClass]="{'active': getUILayerModel(layer.id) && getUILayerModel(layer.id).tabpanel.downloadpanel.expanded}" class="d-none d-md-block"><a data-toggle="tab"><span>Download</span></a></li>
<li *ngIf="isMapSupportedLayer(layer)" (click)="selectTabPanel(layer.id,'downloadpanel')" [ngClass]="{'active': getUILayerModel(layer.id) && getUILayerModel(layer.id).tabpanel.downloadpanel.expanded}" class="d-none d-md-block"><a data-toggle="tab"><span>Download</span></a></li>
</ul>
</div>
<div class="rh_info">
Expand Down
9 changes: 8 additions & 1 deletion src/app/menupanel/layerpanel/layerpanel.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,14 @@ export class LayerPanelComponent implements OnInit {
}
}
}

/**
* Check to see if a layer is supported to be added to the map
* @param layer layer to check
* @returns true if supported layer, false otherwise
*/
public isMapSupportedLayer(layer: LayerModel): boolean {
return this.csMapService.isMapSupportedLayer(layer);
}
/**
* Check if a LayerModel contains a filter collection that has an optional filter of type "OPTIONAL.POLYGONBBOX"
* @param layer the LayerModel
Expand Down