Warning, /firebird/firebird-ng/src/app/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} from '@angular/core';
0002
0003
0004 import { ThreeService } from '../../services/three.service';
0005 import { LocalStorageService } from '../../services/local-storage.service';
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 imports: [
0019 MatIcon,
0020 MatDialogClose,
0021 MatIconButton,
0022 MatTooltip
0023 ]
0024 })
0025 export class LegendWindowComponent implements OnInit, OnDestroy {
0026 /** Local copies that reflect the config property values. */
0027 clippingEnabled = false;
0028
0029
0030
0031
0032 @ViewChild('dialogTemplate') dialogTemplate!: TemplateRef<any>;
0033 dialogRef: MatDialogRef<any> | null = null;
0034
0035 constructor(
0036 private threeService: ThreeService,
0037 private config: LocalStorageService,
0038 private dialog: MatDialog,
0039 private viewContainerRef: ViewContainerRef
0040 ) {}
0041
0042 ngOnInit(): void {
0043
0044 }
0045
0046 ngOnDestroy(): void {
0047
0048 }
0049
0050
0051
0052 openDialog(): void {
0053 if (this.dialogRef) {
0054 this.dialogRef.close();
0055 } else {
0056 this.dialogRef = this.dialog.open(this.dialogTemplate, {
0057 position: {
0058 top: '63px',
0059 left: '600px'
0060 },
0061 disableClose: true,
0062 hasBackdrop: false,
0063 viewContainerRef: this.viewContainerRef
0064 });
0065
0066 this.dialogRef.afterClosed().subscribe(() => {
0067 this.dialogRef = null;
0068 });
0069 }
0070 }
0071
0072
0073
0074 }