Commit f974e82498c904188b0f3fc3f15be1987f4718a1
1 parent
8bada91f
Bugs fix
Showing
3 changed files
with
13 additions
and
15 deletions
controllets/data-sevc-controllet/data-sevc-controllet.html
... | ... | @@ -325,7 +325,7 @@ |
325 | 325 | |
326 | 326 | <div class="fancy area_container"> |
327 | 327 | <paper-tabs selected="{{DatasourceTabSelected}}"> |
328 | - <paper-tab>Select data suorce</paper-tab> | |
328 | + <paper-tab>Select data source</paper-tab> | |
329 | 329 | <paper-tab>Most popular</paper-tab> |
330 | 330 | <paper-tab>Search</paper-tab> |
331 | 331 | </paper-tabs> | ... | ... |
controllets/draggable-element-controllet/draggable-element-controllet.html
... | ... | @@ -116,7 +116,7 @@ |
116 | 116 | </template> |
117 | 117 | |
118 | 118 | <template is="dom-if" if="{{!isTarget}}"> |
119 | - <div class="drag-content-source" draggable="true" on-track="_handleTrack" on-drag="_handleStartDrag"> | |
119 | + <div class="drag-content-source" draggable="true" on-track="_handleTrack" on-drag="_handleOnDrag" on-dragstart="_handleStartDrag"> | |
120 | 120 | <div id="{{identifier}}" class='draggable-card unselectable'>{{label}}</div> |
121 | 121 | </div> |
122 | 122 | </template> |
... | ... | @@ -171,6 +171,11 @@ |
171 | 171 | }, |
172 | 172 | |
173 | 173 | _handleStartDrag : function(e){ |
174 | + /*var target = EventUtil.getCurrentTarget(e); | |
175 | + target.style.cursor = 'move';*/ | |
176 | + }, | |
177 | + | |
178 | + _handleOnDrag : function(e){ | |
174 | 179 | this.targets = document.querySelectorAll('draggable-element-controllet[is-target=true]'); |
175 | 180 | for (var i = 0; i < this.targets.length; i++) { |
176 | 181 | this.targets[i].children[0].children[1].className = "onTrackOnTarget dd-content-target unselectable style-scope draggable-element-controllet"; | ... | ... |
datalets/treemap-datalet/treemap-datalet.html
... | ... | @@ -12,6 +12,7 @@ |
12 | 12 | #treemap_placeholder { |
13 | 13 | width: 100%; |
14 | 14 | height: 70%; |
15 | + min-height: 500px; | |
15 | 16 | background: #ddd; |
16 | 17 | } |
17 | 18 | |
... | ... | @@ -56,7 +57,7 @@ |
56 | 57 | } |
57 | 58 | </style> |
58 | 59 | <div id="treemap_placeholder"></div> |
59 | - <base-datalet data-url="{{dataUrl}}" query="{{query}}" fields-order="{{fieldsOrder}}"></base-datalet> | |
60 | + <base-datalet data-url="{{dataUrl}}" query="{{query}}"></base-datalet> | |
60 | 61 | </template> |
61 | 62 | |
62 | 63 | <script src="../shared_js/d3.js"></script> |
... | ... | @@ -88,16 +89,8 @@ |
88 | 89 | |
89 | 90 | this.map.children = []; |
90 | 91 | |
91 | - //var curr_fields_order = this._component.fieldsOrder.split(','); | |
92 | - //var curr_fields_order = new Array(); | |
93 | - var curr_fields_order = "0,1,2".split(','); | |
94 | - for(var i = 0; i < queries.length; i++) curr_fields_order.push(i); | |
95 | - | |
96 | - var value_index = curr_fields_order[curr_fields_order.length -1]; | |
97 | - curr_fields_order.pop(); | |
98 | - | |
99 | 92 | for(var i = 0; i < this.properties.data.value.length; i++){ |
100 | - this.checkAggragationField(this.properties.data.value[i], curr_fields_order , value_index); | |
93 | + this.checkAggragationField(this.properties.data.value[i], queries.length - 1 , queries.length - 1); | |
101 | 94 | } |
102 | 95 | //var json = JSON.stringify(this.map); |
103 | 96 | }, |
... | ... | @@ -111,12 +104,12 @@ |
111 | 104 | children.push(nchild); |
112 | 105 | return nchild; |
113 | 106 | }, |
114 | - checkAggragationField: function(object, cat_index, value_index){ | |
107 | + checkAggragationField: function(object, levels, value_index){ | |
115 | 108 | var curchild = this.map; |
116 | 109 | var keys = Object.keys(object); |
117 | - for(var level= 0; level < cat_index.length; level++){ | |
110 | + for(var level= 0; level < levels; level++){ | |
118 | 111 | |
119 | - var child = this.findChild(curchild, object[keys[cat_index[level]]]); | |
112 | + var child = this.findChild(curchild, object[keys[level]]); | |
120 | 113 | curchild = child; |
121 | 114 | } |
122 | 115 | ... | ... |