瀏覽代碼

refactor: make all injections public

jmacura 4 年之前
父節點
當前提交
8a3d698a9f
共有 3 個文件被更改,包括 7 次插入6 次删除
  1. 2 2
      src/adjuster/adjuster-loader.component.ts
  2. 3 3
      src/adjuster/adjuster.component.ts
  3. 2 1
      src/adjuster/adjuster.service.ts

+ 2 - 2
src/adjuster/adjuster-loader.component.ts

@@ -11,8 +11,8 @@ export class AdjusterLoaderComponent implements HsDialogComponent {
   @Input() data;
   viewRef: ViewRef;
   constructor(
-    private hsDialogContainerService: HsDialogContainerService,
-    private adjusterEventService: AdjusterEventService
+    public hsDialogContainerService: HsDialogContainerService,
+    public adjusterEventService: AdjusterEventService
   ) {
     this.adjusterEventService.clustersLoaded.subscribe(() => {
       this.hsDialogContainerService.destroy(this);

+ 3 - 3
src/adjuster/adjuster.component.ts

@@ -18,9 +18,9 @@ export class AdjusterComponent implements HsPanelComponent {
   viewRef: ViewRef;
 
   constructor(
-    private adjusterService: AdjusterService,
-    private adjusterEventService: AdjusterEventService,
-    private hsLayoutService: HsLayoutService
+    public adjusterService: AdjusterService,
+    public adjusterEventService: AdjusterEventService,
+    public hsLayoutService: HsLayoutService
   ) {
     this.descriptionVisible = false;
     this.method = this.adjusterService.method;

+ 2 - 1
src/adjuster/adjuster.service.ts

@@ -16,7 +16,7 @@ export class AdjusterService {
   serviceBaseUrl: string;
   factors = [];
   clusters = [];
-  numberOfClusters = 12;
+  numberOfClusters;
   method: string;
   methods: Array<{
     codename: string;
@@ -37,6 +37,7 @@ export class AdjusterService {
         : 'https://publish.lesprojekt.cz/nodejs/';
     this.methods = clusteringMethods;
     this.method = 'haclustwd2';
+    this.numberOfClusters = 12;
   }
 
   /**