Commit 59e45d3663440db3e7a77f88d18fd2acd4482a3c

Authored by Luigi Serra
1 parent ab0fa483

treemap and leafletjs updates

datalets/leafletjs-datalet/leafletjs-datalet.html
@@ -68,7 +68,7 @@ Example: @@ -68,7 +68,7 @@ Example:
68 68
69 /** 69 /**
70 * Read markers coordinates from the data object and add the marker to the map. 70 * Read markers coordinates from the data object and add the marker to the map.
71 - * Call a method for the map redraw and set the viewport in order to fit all the markers in the viewport. 71 + * Call a method for the map redraw and set the viewport in order to fit all the markers in the viewport..
72 * 72 *
73 * @method transformData 73 * @method transformData
74 */ 74 */
datalets/treemap-datalet/treemap-datalet.html
@@ -145,7 +145,7 @@ Example: @@ -145,7 +145,7 @@ Example:
145 this.checkAggragationField(treemapData[i], this.data.length , this.data.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);
149 149
150 }, 150 },
151 151
@@ -177,13 +177,12 @@ Example: @@ -177,13 +177,12 @@ Example:
177 curchild.value = value; 177 curchild.value = value;
178 }, 178 },
179 179
180 - presentData: function(){console.log(TreemapBehavior.map.name);  
181 - //build(this.map, "treemap_placeholder"); 180 + presentData: function(){
  181 + //console.log(TreemapBehavior.map.name);
182 build(this.map, this._component.$.treemap_placeholder); 182 build(this.map, this._component.$.treemap_placeholder);
183 } 183 }
184 }; 184 };
185 185
186 -  
187 Polymer({ 186 Polymer({
188 is : 'treemap-datalet' , 187 is : 'treemap-datalet' ,
189 188
@@ -204,6 +203,12 @@ Example: @@ -204,6 +203,12 @@ Example:
204 ready: function(){ 203 ready: function(){
205 this.behavior = $.extend(true, {}, BaseDataletBehavior, WorkcycleBehavior, AjaxJsonJsonPathBehavior, TreemapBehavior); 204 this.behavior = $.extend(true, {}, BaseDataletBehavior, WorkcycleBehavior, AjaxJsonJsonPathBehavior, TreemapBehavior);
206 this.async(function(){this.behavior.init(this)},0); 205 this.async(function(){this.behavior.init(this)},0);
  206 + },
  207 +
  208 + refresh : function(){
  209 + $(this.$.treemap_placeholder).html("");
  210 + this.behavior.transformData(null);
  211 + this.behavior.presentData();
207 } 212 }
208 213
209 }); 214 });