disabled an icon to make space
This commit is contained in:
		@@ -8,7 +8,7 @@
 | 
			
		||||
        <button mat-icon-button (click)="draw()" [ngClass]="{'selected': drawListener.length}"><mat-icon>create</mat-icon></button>
 | 
			
		||||
        <button mat-icon-button><mat-icon>straighten</mat-icon></button>
 | 
			
		||||
        <button mat-icon-button (click)="remove = !remove" [ngClass]="{'selected': remove}"><mat-icon>delete</mat-icon></button>
 | 
			
		||||
        <button *ngIf="!isNaN(position?.heading)" mat-icon-button (click)="calibrate()"><mat-icon>explore</mat-icon></button>
 | 
			
		||||
        <button *ngIf="position?.heading != Infinity" mat-icon-button (click)="calibrate()"><mat-icon>explore</mat-icon></button>
 | 
			
		||||
        <button mat-icon-button [matMenuTriggerFor]="styleMenu"><mat-icon>layers</mat-icon></button>
 | 
			
		||||
        <mat-menu #styleMenu="matMenu">
 | 
			
		||||
            <button mat-menu-item (click)="style = 'satellite'" [ngClass]="{'selected': style == 'satellite'}">Satellite</button>
 | 
			
		||||
@@ -32,8 +32,8 @@
 | 
			
		||||
    <span *ngIf="!position" class="text-danger">No GPS</span>
 | 
			
		||||
    <div *ngIf="position" class="text-white">
 | 
			
		||||
        Heading:
 | 
			
		||||
        <span *ngIf="isNaN(position.heading)" class="text-danger">No Heading</span>
 | 
			
		||||
        <span *ngIf="!isNaN(position.heading)">{{position.heading | number : '0.0-0'}}°</span>
 | 
			
		||||
        <span *ngIf="position.heading == null" class="text-danger">No Heading</span>
 | 
			
		||||
        <span *ngIf="!isNaN(position.heading)">{{position.heading | number : '1.0-0'}}°</span>
 | 
			
		||||
        <br>
 | 
			
		||||
        Latitude: {{position.latitude | number : '0.0-5'}}
 | 
			
		||||
        <br>
 | 
			
		||||
 
 | 
			
		||||
@@ -24,12 +24,12 @@ export class MapComponent {
 | 
			
		||||
    style: 'satellite' | 'terrain' | 'roadmap' | 'hybrid' = 'terrain';
 | 
			
		||||
    version = version;
 | 
			
		||||
 | 
			
		||||
    Infinity = Infinity;
 | 
			
		||||
    isNaN = isNaN;
 | 
			
		||||
 | 
			
		||||
    constructor(private bpObserver: BreakpointObserver, public physicsService: PhysicsService, private snackBar: MatSnackBar, private bottomSheet: MatBottomSheet) {
 | 
			
		||||
        bpObserver.observe([Breakpoints.Handset]).subscribe(results => this.mobile = results.matches);
 | 
			
		||||
        physicsService.info.pipe(filter(coord => !!coord), debounceTime(50)).subscribe(pos => {
 | 
			
		||||
            console.log('fire');
 | 
			
		||||
        physicsService.info.pipe(filter(coord => !!coord)).subscribe(pos => {
 | 
			
		||||
            if(this.mapApi) {
 | 
			
		||||
                if(!this.position) this.center(pos);
 | 
			
		||||
                this.position = pos;
 | 
			
		||||
 
 | 
			
		||||
@@ -40,8 +40,11 @@ export class PhysicsService {
 | 
			
		||||
                    this.motionTimestamp = currentTime;
 | 
			
		||||
                });
 | 
			
		||||
 | 
			
		||||
                this.orientation.subscribe(() => console.log('orientation'));
 | 
			
		||||
 | 
			
		||||
                // Combine data into one nice package
 | 
			
		||||
                combineLatest(this.position, this.orientation, this.calibrate, this.speed).subscribe(data => {
 | 
			
		||||
                    console.log('combine');
 | 
			
		||||
                    if(!data[0]) return;
 | 
			
		||||
 | 
			
		||||
                    let info = {
 | 
			
		||||
@@ -54,7 +57,6 @@ export class PhysicsService {
 | 
			
		||||
                        speed: data[0].coords.speed
 | 
			
		||||
                    };
 | 
			
		||||
 | 
			
		||||
                    // TODO-debug
 | 
			
		||||
                    if(info.heading == null && data[1]) {
 | 
			
		||||
                        if(!data[1].absolute && data[2] == Infinity) {
 | 
			
		||||
                            this.calibrate.next(0);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user