Skip to content

Commit

Permalink
Merge pull request #206 from jia020/master
Browse files Browse the repository at this point in the history
AUS-3829 Disable DownloadTab when layerAdd is not ready.
  • Loading branch information
stuartwoodman authored Nov 22, 2022
2 parents 9486696 + e952d1d commit c412dd5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
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

0 comments on commit c412dd5

Please sign in to comment.