| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- import {Injectable} from '@angular/core';
- import {HsEventBusService} from 'hslayers-ng/components/core/event-bus.service';
- import {HsLanguageService} from 'hslayers-ng/components/language/language.service';
- import {HsLayerManagerService} from 'hslayers-ng/components/layermanager';
- import {HsLayoutService} from 'hslayers-ng/components/layout/layout.service';
- import {HsPanelContainerService} from 'hslayers-ng/components/layout/panels/panel-container.service';
- import {HsSidebarService} from 'hslayers-ng/components/sidebar/sidebar.service';
- import {AdjusterComponent} from './adjuster/adjuster.component';
- @Injectable({providedIn: 'root'})
- export class AppService {
- constructor(
- public hsEventBus: HsEventBusService,
- public hsLanguageService: HsLanguageService,
- public hsLayerManagerService: HsLayerManagerService,
- public hsLayoutService: HsLayoutService,
- public hsPanelContainerService: HsPanelContainerService,
- public hsSidebarService: HsSidebarService
- ) {
- this.init();
- }
- init(): void {
- this.hsEventBus.layoutLoads.subscribe(() => {
- this.hsLanguageService.setLanguage('cs');
- this.hsSidebarService.buttons.push({
- panel: 'adjuster',
- module: 'pra.adjuster',
- order: 0,
- title: 'Adjust factors',
- description: 'Adjust factors for computation',
- icon: 'icon-analytics-piechart',
- });
- this.hsPanelContainerService.create(AdjusterComponent, {});
- this.hsLayoutService.setDefaultPanel('adjuster');
- });
- }
- }
|