Commit 9bb60e44ba1a3e56d8fa85866a2c8093eef37e5b

Authored by Luigi Serra
1 parent 38149ce9

updates

controllets/data-sevc-controllet/data-sevc-controllet.html
@@ -888,6 +888,8 @@ Example: @@ -888,6 +888,8 @@ Example:
888 this.$.message.show(); 888 this.$.message.show();
889 return false; 889 return false;
890 }else{ 890 }else{
  891 + this.$.datalet_placeholder_2.innerHTML = "";
  892 + if(this.selectedDatalet != undefined) this.injectDatalet(this.$.datalet_placeholder);
891 return true; 893 return true;
892 } 894 }
893 case 3: 895 case 3:
@@ -896,6 +898,7 @@ Example: @@ -896,6 +898,7 @@ Example:
896 this.$.message.show(); 898 this.$.message.show();
897 return false; 899 return false;
898 }else{ 900 }else{
  901 + this.$.datalet_placeholder.innerHTML = "";
899 this.injectDatalet(this.$.datalet_placeholder_2); 902 this.injectDatalet(this.$.datalet_placeholder_2);
900 return true; 903 return true;
901 } 904 }
@@ -1028,6 +1031,7 @@ Example: @@ -1028,6 +1031,7 @@ Example:
1028 _textElementChanged : function(e){ 1031 _textElementChanged : function(e){
1029 if(this.selected == 3) { 1032 if(this.selected == 3) {
1030 this.generateDataletPreview(); 1033 this.generateDataletPreview();
  1034 + this.$.datalet_placeholder.innerHTML = "";
1031 this.injectDatalet(this.$.datalet_placeholder_2); 1035 this.injectDatalet(this.$.datalet_placeholder_2);
1032 } 1036 }
1033 }, 1037 },
@@ -1062,7 +1066,7 @@ Example: @@ -1062,7 +1066,7 @@ Example:
1062 fields : this.selectedFields, 1066 fields : this.selectedFields,
1063 datalet : this.selectedDatalet, 1067 datalet : this.selectedDatalet,
1064 comment : this.$.commentArea.value, 1068 comment : this.$.commentArea.value,
1065 - staticData : JSON.stringify(this.$.datalet_placeholder.children[1].behavior.data) 1069 + staticData : JSON.stringify(this.$.datalet_placeholder_2.children[1].behavior.data)
1066 } 1070 }
1067 1071
1068 this.fire('data-sevc-controllet.dataletCreated', {data : data}); 1072 this.fire('data-sevc-controllet.dataletCreated', {data : data});
datalets/treemap-datalet/js/buildtreemap.js
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 */ 3 */
4 4
5 function build(root, place_holder) { 5 function build(root, place_holder) {
6 - var plwidth = $("#" + place_holder).width(), 6 + var plwidth = $("#" + place_holder).width(),
7 plheight = $("#" + place_holder).height(); 7 plheight = $("#" + place_holder).height();
8 8
9 var margin = {top: 20, right: 0, bottom: 0, left: 0}, 9 var margin = {top: 20, right: 0, bottom: 0, left: 0},
datalets/treemap-datalet/treemap-datalet.html
@@ -142,7 +142,7 @@ Example: @@ -142,7 +142,7 @@ Example:
142 this.map.children = []; 142 this.map.children = [];
143 143
144 for(var i = 0; i < treemapData.length; i++){ 144 for(var i = 0; i < treemapData.length; i++){
145 - this.checkAggragationField(treemapData[i], this._component.fields.length , this._component.fields.length - 1); 145 + this.checkAggragationField(treemapData[i], this.data.length , this.data.length - 1);
146 } 146 }
147 147
148 var json = JSON.stringify(this.map); 148 var json = JSON.stringify(this.map);