More fixes
This commit is contained in:
parent
2a498437dc
commit
0ca0894db5
@ -10,7 +10,7 @@
|
||||
<div class="col-5 pl-0">
|
||||
<mat-form-field appearance="fill" class="w-100">
|
||||
<mat-label>Heading</mat-label>
|
||||
<input matInput type="number" [ngModel]="(physicsService.info | async)?.heading" readonly>
|
||||
<input matInput type="number" [value]="(physicsService.info | async)?.heading | number : '1.0-0'" readonly>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -23,11 +23,11 @@ export class CalibrateComponent {
|
||||
}
|
||||
|
||||
setN() {
|
||||
let currentHeading = this.physicsService.orientation.value.alpha;
|
||||
if(currentHeading <= 180) {
|
||||
this.calibration = 360 - Math.round(currentHeading);
|
||||
let currentHeading = Math.round(this.physicsService.orientation.value.alpha);
|
||||
if(currentHeading < 180) {
|
||||
this.calibration = -currentHeading;
|
||||
} else {
|
||||
this.calibration = -Math.round(currentHeading);
|
||||
this.calibration = 360 - currentHeading;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -23,13 +23,14 @@ export class MapComponent {
|
||||
isNaN = isNaN;
|
||||
|
||||
menu: ToolbarItem[][] = [[
|
||||
{name: 'compass', icon: 'explore', click: () => this.calibrate()},
|
||||
{name: 'compass', icon: 'explore', click: () => this.calibrate(), hidden: true},
|
||||
], [
|
||||
{name: 'marker', icon: 'room', toggle: true, individualToggle: true, click: () => this.addMarker()},
|
||||
{name: 'draw', icon: 'create', toggle: true, individualToggle: true, onEnabled: () => this.startDraw(), onDisabled: () => this.endDraw()},
|
||||
{name: 'measure', icon: 'straighten', toggle: true, individualToggle: true, click: () => this.measure()},
|
||||
{name: 'delete', icon: 'delete', toggle: true, individualToggle: true},
|
||||
{name: 'style', icon: 'terrain', enabled: true, toggle: true, onEnabled: () => this.style = 'terrain', onDisabled: () => this.style = 'satellite'}
|
||||
{name: 'style', icon: 'terrain', enabled: true, toggle: true, onEnabled: () => this.style = 'terrain', onDisabled: () => this.style = 'satellite'},
|
||||
{name: 'compass', icon: 'explore', click: () => this.calibrate()}
|
||||
], [
|
||||
{name: 'messages', icon: 'chat', hidden: true},
|
||||
{name: 'identity', icon: 'perm_identity', hidden: true},
|
||||
|
@ -5,7 +5,10 @@
|
||||
outline: none !important;
|
||||
}
|
||||
|
||||
html, body { height: 100%; }
|
||||
html, body {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
body {
|
||||
margin: 0;
|
||||
overscroll-behavior: none;
|
||||
|
Loading…
Reference in New Issue
Block a user