Back to home page

EIC code displayed by LXR

 
 

    


Warning, /firebird/packages/firebird-ng/display/src/lib/components/legend-window/legend-window.component.ts is written in an unsupported language. File is not indexed.

0001 import {Component, OnInit, OnDestroy, ViewChild, TemplateRef, ViewContainerRef, ChangeDetectionStrategy} from '@angular/core';
0002 
0003 
0004 import { ThreeService } from '../../services/three.service';
0005 import { ConfigService } from '@dexvis/app-features';
0006 
0007 
0008 import {MatIconButton} from "@angular/material/button";
0009 
0010 import {MatDialog, MatDialogClose, MatDialogRef} from "@angular/material/dialog";
0011 import {MatIcon} from "@angular/material/icon";
0012 import {MatTooltip} from "@angular/material/tooltip";
0013 
0014 @Component({
0015   selector: 'app-legend-window',
0016   templateUrl: './legend-window.component.html',
0017   styleUrls: ['./legend-window.component.scss'],
0018   changeDetection: ChangeDetectionStrategy.OnPush,
0019   imports: [
0020     MatIcon,
0021     MatDialogClose,
0022     MatIconButton,
0023     MatTooltip
0024   ]
0025 })
0026 export class LegendWindowComponent implements OnInit, OnDestroy {
0027   /** Local copies that reflect the config property values. */
0028   clippingEnabled = false;
0029 
0030 
0031 
0032 
0033   @ViewChild('dialogTemplate') dialogTemplate!: TemplateRef<any>;
0034   dialogRef: MatDialogRef<any> | null = null;
0035 
0036   constructor(
0037     private threeService: ThreeService,
0038     private config: ConfigService,
0039     private dialog: MatDialog,
0040     private viewContainerRef: ViewContainerRef
0041   ) {}
0042 
0043   ngOnInit(): void {
0044 
0045   }
0046 
0047   ngOnDestroy(): void {
0048 
0049   }
0050 
0051 
0052 
0053   openDialog(): void {
0054     if (this.dialogRef) {
0055       this.dialogRef.close();
0056     } else {
0057       this.dialogRef = this.dialog.open(this.dialogTemplate, {
0058         position: {
0059           top: '63px',
0060           left: '600px'
0061         },
0062         disableClose: true,
0063         hasBackdrop: false,
0064         viewContainerRef: this.viewContainerRef
0065       });
0066 
0067       this.dialogRef.afterClosed().subscribe(() => {
0068         this.dialogRef = null;
0069       });
0070     }
0071   }
0072 
0073 
0074 
0075 }