Skip to content
Snippets Groups Projects
viewerCmp.template.html 34.6 KiB
Newer Older
Xiao Gui's avatar
Xiao Gui committed
  </ng-template>

</ng-template>

<!-- spatial search tmpls -->
Xiao Gui's avatar
Xiao Gui committed
<ng-template #spatialFeatureListTmpl>
  <mat-card class="sxplr-pe-all"
    [ngClass]="{
      'sxplr-d-none': !(voiSwitch.switchState$ | async) || (voiFeatureEntryCmp.totals$ | async) === 0
Xiao Gui's avatar
Xiao Gui committed
      <mat-card-title>
Xiao Gui's avatar
Xiao Gui committed
        Anchored to current view
Xiao Gui's avatar
Xiao Gui committed
      </mat-card-title>
      <mat-card-subtitle>
        <div>
          {{ templateSelected$ | async | getProperty : 'name' }}
        </div>
        <ng-template [ngIf]="bbox.bbox$ | async | getProperty : 'bbox'" let-bbox>
          <div>
            from {{ bbox[0] | numbers | addUnitAndJoin : '' }}
          </div>
          <div>
            to {{ bbox[1] | numbers | addUnitAndJoin : '' }}
          </div>
Xiao Gui's avatar
Xiao Gui committed
        </ng-template>
      </mat-card-subtitle>
    </mat-card-header>
Xiao Gui's avatar
Xiao Gui committed

    <mat-slide-toggle [formControl]="showVOIWireframeSlideToggle">
      <span>
        Show VOI Wireframe
      </span>
      <spinner-cmp class="sxplr-d-inline-block" *ngIf="loadingVoiWireFrame$ | async"></spinner-cmp>
    </mat-slide-toggle>
  <sxplr-feature-entry
    [ngClass]="(voiSwitch.switchState$ | async) ? 'sxplr-d-block' : 'sxplr-d-none'"
    class="sxplr-pe-all mat-elevation-z8"
    [template]="templateSelected$ | async"
    [bbox]="bbox.bbox$ | async | getProperty : 'bbox'"
    #voiFeatureEntryCmp="featureEntryCmp">
  </sxplr-feature-entry>
  <mat-card [ngClass]="{
    'sxplr-d-none': (voiFeatureEntryCmp.totals$ | async) > 0
  }">
    No spatial features found.
  </mat-card>

  <button mat-raised-button
    [ngClass]="{
      'sxplr-d-none': (voiFeatureEntryCmp.totals$ | async) === 0
    }"
    class="sxplr-pe-all sxplr-w-100"
    iav-switch
    [iav-switch-state]="false"
    #voiSwitch="iavSwitch"
    (click)="voiSwitch.toggle()">
    <ng-template [ngIf]="voiSwitch.switchState$ | async" [ngIfElse]="chevronCollapseTmpl">
      <i class="fas fa-chevron-up"></i>
      <span>
        Collapse
      </span>
    </ng-template>
    <ng-template #chevronCollapseTmpl>
      <i class="fas fa-chevron-down"></i>
      <span>
        Explore {{ voiFeatureEntryCmp.totals$ | async }} spatial features
      </span>
    </ng-template>
  </button>
Xiao Gui's avatar
Xiao Gui committed

  <!-- TODO voiBbox directive is used to draw outlines for VOI
  this has been temporarily disabled, since datasource is paginated 
  and how bounding boxes are drawn needs to be reconsidered -->
  
Xiao Gui's avatar
Xiao Gui committed
  <div
    *ngIf="showVOIWireframeSlideToggle.valueChanges | async"
    voiBbox
    [features]="voiFeatureEntryCmp.features$ | async">

Xiao Gui's avatar
Xiao Gui committed
  </div>
  sxplr-sapiviews-core-space-boundingbox
  [sxplr-sapiviews-core-space-boundingbox-atlas]="selectedAtlas$ | async"
  [sxplr-sapiviews-core-space-boundingbox-space]="templateSelected$ | async"
  [sxplr-sapiviews-core-space-boundingbox-spec]="viewerCtx$ | async | nehubaVCtxToBbox"
  #bbox="sxplrSapiViewsCoreSpaceBoundingBox">
</div>