|
|
@@ -1,6 +1,8 @@
|
|
|
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';
|
|
|
@@ -10,25 +12,29 @@ 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.hsLanguageService.setLanguage('cs');
|
|
|
this.init();
|
|
|
}
|
|
|
|
|
|
init(): void {
|
|
|
- this.hsSidebarService.buttons.push({
|
|
|
- panel: 'adjuster',
|
|
|
- module: 'pra.adjuster',
|
|
|
- order: 0,
|
|
|
- title: 'Adjust factors',
|
|
|
- description: 'Adjust factors for computation',
|
|
|
- icon: 'icon-analytics-piechart',
|
|
|
+ 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');
|
|
|
});
|
|
|
- this.hsPanelContainerService.create(AdjusterComponent, {});
|
|
|
- this.hsLayoutService.setDefaultPanel('adjuster');
|
|
|
}
|
|
|
}
|