taffy-coustom-ui
Version:
32 lines (25 loc) • 902 B
text/typescript
import { Component, AfterViewInit, HostListener } from '@angular/core';
import { SharedService } from '../../services/shared-service';
({
selector: 'app-profit',
templateUrl: './profit.component.html',
styleUrls: ['./profit.component.css']
})
export class ProfitComponent implements AfterViewInit {
constructor(private sharedService: SharedService) { }
('window:resize', ['$event'])
onResize(event) {
this.setHeight();
}
ngAfterViewInit() {
this.setHeight();
}
setHeight() {
if (this.sharedService.mainSplitter.orientation() === 'vertical') {
this.sharedService.mainSplitter.height(Math.max(979, window.screen.height));
} else {
this.sharedService.mainSplitter.height(1102);
this.sharedService.mainSplitter.panels([{ size: 113 }, { size: 989 }]);
}
}
}