~hokiegeek/biologist-web

ref: b6f62f29b8cef976d01932042d5eb079098ec37a biologist-web/src/app/petridish/petridish.component.html -rw-r--r-- 2.6 KiB
b6f62f29HokieGeek GUI simplication 3 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<div class="m-2 d-flex flex-row">
   <!--/div>
       <div class="d-flex flex-row">
        <div class="input-group">
       <div class="input-group-prepend">
       <span class="input-group-text">Density</span>
       </div>
       <input type="text" class="form-control" size="3" placeholder="density" [(ngModel)]="defaultDensity" aria-describedby="basic-addon1">
       <div class="input-group-append">
       <span class="input-group-text">%</span>
       </div>
       </div-->
    <!-- TODO: Add delete button -->
    <div class="d-flex flex-column">
        <div class="d-flex flex-row mt-1">
            <app-board [cols]="experiment.columns" [rows]="experiment.rows"
                   [cellSize]="cellSize" [cellSpacing]="cellSpacing"
                   [cells]="getCurrentGeneration().living">
            </app-board>
            <div class="d-flex align-items-start flex-column pb-2 ml-1">
                <div class="h-100 mb-auto">
                    <app-culture-info [generation]="getCurrentGeneration()"
                                  [boardWidth]="experiment.columns"
                                  [boardHeight]="experiment.rows"
                                  (close)="destroy()">
                    </app-culture-info>
                </div>
                <div *ngIf="!creating" class="mt-1 playback-controls align-items-end w-100">
                    <div>
                        <span *ngIf="!playing">
                            <span (click)="nav('-', 20)" title="Move backwards 20 generations">&#x25c5;</span>
                            <span (click)="nav('-', 1)" title="Move backwards 1 generation">&#x25c2;</span>
                        </span>
                        <span (click)="togglePlaying()">
                            <span *ngIf="!playing" title="Play">&#x25ba;</span>
                            <span *ngIf="playing" title="Pause">▮▮</span>
                        </span>
                        <span *ngIf="!playing">
                            <span (click)="nav('+', 1)" title="Move forward 1 generation">&#x25b8;</span>
                            <span (click)="nav('+', 20)" title="Move forward 20 generations">&#x25bb;</span>
                        </span>
                    </div>
                    <div class="speed">
                        <span (click)="speed('-', 10)" title="decrease rate">-</span>
                        <span>{{playRateMs}}ms</span>
                        <span (click)="speed('+', 10)" title="increase rate">+</span>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>