aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/pages/composition/graph/canvas-zone/zone-container.component.ts
blob: 4757c1f36dce3852c3ad627ceb9afe151664536b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import { Component, Input, Output, ViewEncapsulation, EventEmitter, OnInit } from '@angular/core';
import { ZoneInstanceType } from 'app/models/graph/zones/zone-instance';

@Component({
    selector: 'zone-container',
    templateUrl: './zone-container.component.html',
    styleUrls: ['./zone-container.component.less'],
    encapsulation: ViewEncapsulation.None
})

export class ZoneContainerComponent implements OnInit {
    @Input() title:string;
    @Input() type:ZoneInstanceType;
    @Input() count:number;   
    @Input() visible:boolean;
    @Input() minimized:boolean;
    @Output() minimize: EventEmitter<any> = new EventEmitter<any>();
    @Output() backgroundClick: EventEmitter<void> = new EventEmitter<void>();
    private class:string;

    constructor() {}

    ngOnInit() {
        this.class = ZoneInstanceType[this.type].toLowerCase();
    }

    private unminifyZone = () => {
        this.minimize.emit();
    }

    private backgroundClicked = () => {
        this.backgroundClick.emit();
    }

}