view src/app/analysis-item/analysis-item.component.html @ 484:ae96db60f25c

Move extraction toggle button back to right edge.
author Lucas Thompson <dev@lucas.im>
date Mon, 03 Jul 2017 20:32:51 +0100
parents 5df3ce3574e5
children 0fbba61603b3 64ed45a0bad3
line wrap: on
line source
<md-card>
  <md-card-header>
    <md-card-title>{{item.title}}</md-card-title>
    <md-card-subtitle>{{item.description}}</md-card-subtitle>
  </md-card-header>
  <md-card-content>
    <div class="content">
      <ng-template [ngIf]="isLoading()">
        <ugly-progress-bar
          [isDeterminate]="true"
          [progress]="item.progress"
        ></ugly-progress-bar>
      </ng-template>
      <ng-template [ngIf]="!isLoading()">
        <ugly-progress-spinner *ngIf="isPending()"></ugly-progress-spinner>
        <ugly-waves-play-head
          [colour]="'#c33c54'"
          [isActive]="isActive"
        >
          <ugly-waveform
            *ngIf="isAudioItem(); else notAudio"
            [timeline]="timeline"
            [width]="contentWidth"
            [audioBuffer]="item.audioData"
            [onSeek]="onSeek"
            [colour]="'#0868ac'"
            [duration]="getDuration()"
          ></ugly-waveform>
        </ugly-waves-play-head>


        <ugly-waves-play-head
          #notAudio
          *ngIf="getFeatureShape() as shape"
          [ngSwitch]="shape"
          [colour]="'#c33c54'"
          [isActive]="isActive"
        >
          <ugly-cross-hair-inspector
            *ngSwitchCase="'vector'"
            [unit]="item.unit"
            [isAnimated]="isActive"
          >
            <ugly-curve
              [colour]="getNextColour()"
              [timeline]="timeline"
              [width]="contentWidth"
              [onSeek]="onSeek"
              [curve]="item.collected"
              [duration]="getDuration()"
            ></ugly-curve>
          </ugly-cross-hair-inspector>
          <ugly-cross-hair-inspector
            *ngSwitchCase="'tracks'"
            [unit]="item.unit"
            [isAnimated]="isActive"
          >
            <ugly-tracks
              [colour]="getNextColour()"
              [timeline]="timeline"
              [width]="contentWidth"
              [onSeek]="onSeek"
              [tracks]="item.collected"
              [duration]="getDuration()"
            ></ugly-tracks>
          </ugly-cross-hair-inspector>
          <ugly-cross-hair-inspector
            *ngSwitchCase="'notes'"
            [unit]="item.unit"
            [isAnimated]="isActive"
          >
            <ugly-notes
              [colour]="getNextColour()"
              [timeline]="timeline"
              [width]="contentWidth"
              [onSeek]="onSeek"
              [notes]="item.collected"
              [duration]="getDuration()"
            ></ugly-notes>
          </ugly-cross-hair-inspector>
          <ugly-vertical-binned
            *ngSwitchCase="'matrix'"
          >
            <ugly-grid
              [colour]="getNextColour()"
              [timeline]="timeline"
              [width]="contentWidth"
              [onSeek]="onSeek"
              [grid]="item.collected"
              [duration]="getDuration()"
            ></ugly-grid>
          </ugly-vertical-binned>
          <ugly-instants
            *ngSwitchCase="'instants'"
            [colour]="getNextColour()"
            [timeline]="timeline"
            [width]="contentWidth"
            [onSeek]="onSeek"
            [instants]="item.collected"
            [duration]="getDuration()"
          ></ugly-instants>

          <div *ngSwitchDefault>Feature cannot be visualised.</div>
        </ugly-waves-play-head>
      </ng-template>
    </div>
  </md-card-content>
  <md-card-actions
    *ngIf="isAudioItem()">
    <a md-icon-button
       *ngIf="isAudioItem() && item.isExportable"
      [href]="sanitize(item.uri)"
      [download]="generateFilename(item)"
    ><md-icon>file_download</md-icon></a>
    <button md-icon-button (click)="remove.emit(item)">
      <md-icon>delete_forever</md-icon>
    </button>
  </md-card-actions>
</md-card>