-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e15fb85
commit 4a4602f
Showing
7 changed files
with
174 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 28 additions & 27 deletions
55
...ication/frontend/src/app/core/containers/travel-simulator/travel-simulator.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,31 @@ | ||
<div class="container p-1 app-map-panel"> | ||
<div class="d-flex align-items-center"> | ||
<mat-slide-toggle [checked]="active$ | async" (change)="onToggleActive($event)" color="primary" | ||
>Activate travel simulator</mat-slide-toggle | ||
>Travel simulator</mat-slide-toggle | ||
> | ||
<div class="time-value">{{ formatSecondsDate(timeDisplayed$ | async) }}</div> | ||
<mat-slider | ||
class="w-100 pt-0" | ||
color="primary" | ||
[value]="time$ | async" | ||
[min]="start$ | async" | ||
[max]="end$ | async" | ||
[disabled]="!(active$ | async)" | ||
(input)="onTimeChanged($event)"></mat-slider> | ||
<button | ||
type="button" | ||
mat-button | ||
color="primary" | ||
[disabled]="!(active$ | async)" | ||
(click)="!animationTimer$ || animationTimer$.closed ? onBeginAnimate() : onEndAnimate()"> | ||
{{ !animationTimer$ || animationTimer$.closed ? 'Animate routes' : 'Stop animating routes' }} | ||
</button> | ||
<mat-form-field appearance="fill"> | ||
<mat-label>Speed</mat-label> | ||
<mat-select [(value)]="animationSpeedMultiple"> | ||
<mat-option [value]="1"> Slow </mat-option> | ||
<mat-option [value]="3"> Normal </mat-option> | ||
<mat-option [value]="6"> Fast </mat-option> | ||
</mat-select> | ||
</mat-form-field> | ||
<div *ngIf="active$ | async" class="d-flex align-items-center simulator-contents"> | ||
<mat-divider [vertical]="true" class="divider"></mat-divider> | ||
<button | ||
mat-mini-fab | ||
color="primary" | ||
class="play-button" | ||
type="button" | ||
[disabled]="!(active$ | async)" | ||
(click)="!animationTimer$ || animationTimer$.closed ? onBeginAnimate() : onEndAnimate()"> | ||
<mat-icon | ||
[svgIcon]="!animationTimer$ || animationTimer$.closed ? 'play' : 'pause'"></mat-icon> | ||
</button> | ||
<mat-divider [vertical]="true" class="divider"></mat-divider> | ||
<div class="d-flex align-items-center speed-container"> | ||
<div>Speed:</div> | ||
<mat-radio-group | ||
aria-label="Animation speed" | ||
color="primary" | ||
[(ngModel)]="animationSpeedMultiple"> | ||
<mat-radio-button [value]="0.5">0.5x</mat-radio-button> | ||
<mat-radio-button [value]="1">1x</mat-radio-button> | ||
<mat-radio-button [value]="3">3x</mat-radio-button> | ||
<mat-radio-button [value]="5">5x</mat-radio-button> | ||
</mat-radio-group> | ||
</div> | ||
</div> | ||
</div> |
45 changes: 35 additions & 10 deletions
45
...ication/frontend/src/app/core/containers/travel-simulator/travel-simulator.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,42 @@ | ||
@import '../../../../styles/variables.scss'; | ||
|
||
:host { | ||
position: absolute; | ||
top: 10px; | ||
left: 0; | ||
right: 0; | ||
display: flex; | ||
justify-content: center; | ||
bottom: 10px; | ||
left: 10px; | ||
padding: 10px; | ||
} | ||
|
||
.simulator-toggle { | ||
font-size: 16px; | ||
line-height: 24px; | ||
} | ||
|
||
.simulator-contents { | ||
margin-left: 20px; | ||
gap: 20px; | ||
} | ||
|
||
.container { | ||
width: 50%; | ||
.divider { | ||
height: 24px; | ||
} | ||
|
||
.time-value { | ||
text-align: center; | ||
padding-top: 8px; | ||
.play-button { | ||
box-shadow: none; | ||
height: 24px; | ||
width: 24px; | ||
|
||
.mat-button-wrapper { | ||
position: relative; | ||
top: -4px; | ||
} | ||
} | ||
|
||
.speed-container { | ||
gap: 10px; | ||
|
||
mat-radio-group { | ||
display: flex; | ||
gap: 10px; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters