Commit 71ed2ed2db99a45a29aa953fdb467b2bb6f910c5
1 parent
f918bf0d
redraw
Showing
3 changed files
with
23 additions
and
2 deletions
datalets/base-datalet/base-datalet.html
@@ -254,6 +254,10 @@ Example : | @@ -254,6 +254,10 @@ Example : | ||
254 | // this.$.domain.textContent = url; | 254 | // this.$.domain.textContent = url; |
255 | // }, | 255 | // }, |
256 | 256 | ||
257 | + removeLoader: function() { | ||
258 | + this.$.base_datalet_imgWaitDatalet.style.display = "none"; | ||
259 | + }, | ||
260 | + | ||
257 | hideFooter: function() { | 261 | hideFooter: function() { |
258 | this.$.base_datalet_container.innerHTML = ""; | 262 | this.$.base_datalet_container.innerHTML = ""; |
259 | this.$.base_datalet_container.style.margin = 0; | 263 | this.$.base_datalet_container.style.margin = 0; |
datalets/base-datalet/static/js/WorkcycleBehavior.js
@@ -79,6 +79,15 @@ var WorkcycleBehavior = { | @@ -79,6 +79,15 @@ var WorkcycleBehavior = { | ||
79 | }, | 79 | }, |
80 | 80 | ||
81 | /** | 81 | /** |
82 | + * Build the object/s for presentation layer. | ||
83 | + * | ||
84 | + * @method presentData | ||
85 | + */ | ||
86 | + redraw: function(){ | ||
87 | + | ||
88 | + }, | ||
89 | + | ||
90 | + /** | ||
82 | * This method represents the entire datalet workcycle. | 91 | * This method represents the entire datalet workcycle. |
83 | * | 92 | * |
84 | * @method runWorkcycle | 93 | * @method runWorkcycle |
@@ -87,10 +96,12 @@ var WorkcycleBehavior = { | @@ -87,10 +96,12 @@ var WorkcycleBehavior = { | ||
87 | this.selectData(); | 96 | this.selectData(); |
88 | this.filterData(); | 97 | this.filterData(); |
89 | this.transformData(); | 98 | this.transformData(); |
99 | + | ||
90 | var that = this; | 100 | var that = this; |
91 | this._component.async(function () { | 101 | this._component.async(function () { |
92 | that.presentData(); | 102 | that.presentData(); |
93 | - $("img[src$='spin.svg']").remove(); | 103 | + $(that._component).find("base-datalet")[0].removeLoader(); |
104 | + that.redraw(); | ||
94 | }, 100); | 105 | }, 100); |
95 | }, | 106 | }, |
96 | 107 | ||
@@ -107,10 +118,12 @@ var WorkcycleBehavior = { | @@ -107,10 +118,12 @@ var WorkcycleBehavior = { | ||
107 | }else{ | 118 | }else{ |
108 | this.data = this._component.data; | 119 | this.data = this._component.data; |
109 | this.transformData(); | 120 | this.transformData(); |
121 | + | ||
110 | var that = this; | 122 | var that = this; |
111 | this._component.async(function () { | 123 | this._component.async(function () { |
112 | that.presentData(); | 124 | that.presentData(); |
113 | - $("img[src$='spin.svg']").remove(); | 125 | + $(that._component).find("base-datalet")[0].removeLoader(); |
126 | + that.redraw(); | ||
114 | }, 100); | 127 | }, 100); |
115 | } | 128 | } |
116 | } | 129 | } |
datalets/highcharts-datalet/highcharts-datalet.html
@@ -122,6 +122,10 @@ Example : | @@ -122,6 +122,10 @@ Example : | ||
122 | this.properties.series.value = series; | 122 | this.properties.series.value = series; |
123 | } | 123 | } |
124 | 124 | ||
125 | + }, | ||
126 | + | ||
127 | + redraw: function () { | ||
128 | + $(this._component.$.charts.$.container).highcharts().reflow(); | ||
125 | } | 129 | } |
126 | 130 | ||
127 | }; | 131 | }; |