Commit f7a1603c authored by Mahdi Mahmoudy's avatar Mahdi Mahmoudy
Browse files

Merge branch 'master' into basket-fix

parents 70e593b3 65ff6824
...@@ -12,6 +12,14 @@ ...@@ -12,6 +12,14 @@
<label> <label>
<input type="checkbox" ng-model="$parent.showIds"> Show Ids <input type="checkbox" ng-model="$parent.showIds"> Show Ids
</label> </label>
<label>Chart size
<select
ng-options="item as item.name for item in multiplyChartSizeItems"
ng-model="multiplyChartSizeSelected"
ng-change="multiplyChartSize(multiplyChartSizeSelected)"
ng-init="item=multiplyChartSizeItems[0]">
</select>
</label>
<label>Term box width <label>Term box width
<input type="number" ng-model="$parent.termBoxWidth"> <input type="number" ng-model="$parent.termBoxWidth">
</label> </label>
......
...@@ -12,17 +12,40 @@ angular ...@@ -12,17 +12,40 @@ angular
link: function(scope) { link: function(scope) {
scope.showKey = true; scope.showKey = true;
scope.showIds = true; scope.showIds = true;
scope.termBoxWidth = 85; scope.originalTermBoxWidth = 85;
scope.termBoxHeight = 55; scope.originalTermBoxHeight = 55;
scope.fontSize = 11; scope.originalFontSize = 11;
scope.termBoxWidth = scope.originalTermBoxWidth;
scope.termBoxHeight = scope.originalTermBoxHeight;
scope.fontSize = scope.originalFontSize;
scope.showSlimColours = false; scope.showSlimColours = false;
scope.showChildren = false; scope.showChildren = false;
var that = this; var that = this;
scope.applyOptions = function(){
scope.applyOptions = function() {
that.drawChart(scope); that.drawChart(scope);
}; };
scope.multiplyChartSizeItems = [
{ name: "Default - normal", value: 1 },
{ name: "2X - double", value: 2 },
{ name: "3X - triple", value: 3 },
{ name: "4X - quadruple", value: 4 },
];
scope.multiplyChartSize = function(selectedItem) {
var size = selectedItem.value;
if (!size) {
return;
}
scope.termBoxWidth = scope.originalTermBoxWidth * size;
scope.termBoxHeight = scope.originalTermBoxHeight * size;
scope.fontSize = scope.originalFontSize * size;
}
scope.downloadChart = function() { scope.downloadChart = function() {
if (!scope.termBoxHeight) { if (!scope.termBoxHeight) {
return; return;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment