Skip to content

Commit

Permalink
stepBack
Browse files Browse the repository at this point in the history
  • Loading branch information
sqrd-max committed Aug 30, 2024
1 parent 8e427c5 commit aaf7518
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion firebird-ng/src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<nav class="navbar navbar-expand-lg navbar-dark" style="background-color: #424242;">
<nav class=" navbar navbar-expand-lg navbar-dark" style="background-color: #424242;">
<a class="navbar-brand" href="#"><img src="assets/firebird/firebird-simplified-circle.png" width="32" height="32" alt="App Logo"></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
Expand Down
4 changes: 4 additions & 0 deletions firebird-ng/src/app/main-display/main-display.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@
<button mat-raised-button aria-label="Play" matTooltip="Play time forward" class="tcontrol" (click)="animateTime()">
<mat-icon>play_arrow</mat-icon>
</button>
<button mat-raised-button aria-label="Step" matTooltip="Step 1ns backward" (click)="timeStepBack($event)" class="tcontrol">
<mat-icon>chevron_left</mat-icon>
</button>

<button mat-raised-button aria-label="Step" matTooltip="Step 1ns forward" (click)="timeStep($event)" class="tcontrol">
<mat-icon>chevron_right</mat-icon>
</button>
Expand Down
5 changes: 5 additions & 0 deletions firebird-ng/src/app/main-display/main-display.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,11 @@ export class MainDisplayComponent implements OnInit {

//this.updateParticlePosition(value);
}
timeStepBack($event: MouseEvent) {
if(this.currentTime > this.minTime) this.currentTime--;
if(this.currentTime < this.minTime) this.currentTime = this.minTime;
this.processCurrentTimeChange();
}

timeStep($event: MouseEvent) {
if(this.currentTime < this.maxTime) this.currentTime++;
Expand Down

0 comments on commit aaf7518

Please sign in to comment.