|
|
@@ -5,7 +5,7 @@ import {factors} from './factors.js';
|
|
|
export class AdjusterService {
|
|
|
constructor(HsCore, HsUtilsService, $rootScope, $http, $location) {
|
|
|
'ngInject';
|
|
|
- this.HsCore = HsCore;
|
|
|
+ //this.HsCore = HsCore;
|
|
|
this.HsUtilsService = HsUtilsService;
|
|
|
this.$rootScope = $rootScope;
|
|
|
this.$http = $http;
|
|
|
@@ -15,6 +15,7 @@ export class AdjusterService {
|
|
|
: 'https://publish.lesprojekt.cz/nodejs/';
|
|
|
this.factors = factors;
|
|
|
this.clusters = [];
|
|
|
+ this.method = 'haclust';
|
|
|
this._clusteringInProcess = true;
|
|
|
this.init();
|
|
|
}
|
|
|
@@ -69,8 +70,8 @@ export class AdjusterService {
|
|
|
});
|
|
|
const clusters = [];
|
|
|
for (const region of clusterData) {
|
|
|
- if (!clusters.includes(region['haclust'])) {
|
|
|
- clusters.push(region['haclust']);
|
|
|
+ if (!clusters.includes(region[this.method])) {
|
|
|
+ clusters.push(region[this.method]);
|
|
|
}
|
|
|
}
|
|
|
this.clusters = clusters;
|
|
|
@@ -110,7 +111,6 @@ export class AdjusterService {
|
|
|
};
|
|
|
});
|
|
|
});
|
|
|
- console.log(this.factors);
|
|
|
this.apply();
|
|
|
})
|
|
|
.catch((error) => {
|