Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
FernandoES committed Oct 30, 2017
1 parent 01694eb commit 01d23b3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</collapsible-element-directive>

<collapsible-element-directive label="Statistics" icon-class="fa-line-chart">
<dropdown-directive values="$ctrl.STATISTIC_OPS" model="$ctrl.settings.operation" change="$ctrl.notify()"></dropdown-directive>
<dropdown-directive values="$ctrl.STATISTIC_OPS" model="$ctrl.settings.operation" change="$ctrl.onStatisticsChange()"></dropdown-directive>
</collapsible-element-directive>

</collapsible-directive>
Expand Down
15 changes: 11 additions & 4 deletions visualization/app/codeCharta/ui/settingsPanel/settingsPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,6 @@ export class SettingsPanelController {
* @param {Settings} settings
*/
onSettingsChanged(settings) {
const util = require('util');
console.log("operation "+this.settings.operation);
this.settings.map = this.statisticMapService.unifyMaps(this.setOfMaps, this.settings.operation);//Working here
console.log("this.settings.map ",util.inspect(this.settings.map,{showHidden: true, depth: null}));
this.sliderOptions.ceil = this.treeMapService.getMaxNodeHeightInAllRevisions(settings.heightMetric);
}

Expand Down Expand Up @@ -104,6 +100,17 @@ export class SettingsPanelController {
return arr.sort();
}

/**
* Updates the map before broadcasting the udpate of the settings
*/
onStatisticsChange(){
const util = require('util');
console.log("operation "+this.settings.operation);
this.settings.map = this.statisticMapService.unifyMaps(this.setOfMaps, this.settings.operation);//Working here
console.log("this.settings.map ",util.inspect(this.settings.map,{showHidden: true, depth: null}));
this.notify();
}

}

export const settingsPanelComponent = {
Expand Down

0 comments on commit 01d23b3

Please sign in to comment.