Commit 3afa41ee92ef44452401ca7f93f99c21b34e9f86

Authored by Erdogan Furkan
1 parent fab2e175

#10663 - Fixed bug

js/app/views/PlotComponents/PlotPreviewUI.js
... ... @@ -143,7 +143,9 @@ Ext.define('amdaPlotComp.PlotPreviewUI', {
143 143 this.crtContext = configResult.context;
144 144  
145 145 this.panelImage.setSrc(this.getImageUrl(configResult.folder, configResult.plotFile));
146   -
  146 + var newTime = new Date(configResult.time);
  147 + newTime = Ext.Date.add(newTime, Ext.Date.MINUTE, newTime.getTimezoneOffset());
  148 + Ext.getCmp('plotPreview-goto-Date' + configResult.interactiveId).setValue(newTime);
147 149 var size = this.getImageSize();
148 150 this.panelImage.setSize(size.width, size.height);
149 151  
... ... @@ -155,7 +157,8 @@ Ext.define('amdaPlotComp.PlotPreviewUI', {
155 157  
156 158 this.crtContext = configResult.context;
157 159 this.interactiveId = configResult.interactiveId;
158   - this.time = configResult.time;
  160 + this.time = new Date(configResult.time);
  161 + this.time = Ext.Date.add(this.time, Ext.Date.MINUTE, this.time.getTimezoneOffset());
159 162 this.panelId= configResult.panelId
160 163  
161 164 this.coordinatesField = new Ext.toolbar.TextItem({
... ... @@ -211,7 +214,8 @@ Ext.define('amdaPlotComp.PlotPreviewUI', {
211 214 scope: this,
212 215 handler: function (bt) {
213 216 var newTime = Ext.getCmp('plotPreview-goto-Date' + me.interactiveId).getValue();
214   - me.panelResultInstance.callInteractivePlot({ 'action': 'instant', 'interactiveId': me.panelResultInstance.interactiveId, 'panelId': me.panelId, 'time': newTime });
  217 + newTime = Ext.Date.add(newTime, Ext.Date.MINUTE, -newTime.getTimezoneOffset());
  218 + me.panelResultInstance.callInteractivePlot({ 'action': 'instant', 'interactiveId': me.panelResultInstance.interactiveId, 'panelId': me.panelId, 'time': newTime.toISOString()});
215 219 }
216 220 },
217 221 '-',
... ... @@ -220,9 +224,7 @@ Ext.define('amdaPlotComp.PlotPreviewUI', {
220 224 text : 'Previous',
221 225 handler: function(){
222 226 var newTime = new Date(amdaPlotComp.PlotContextManager.getInstantTimePrev(me.crtContext)*1000);
223   - newTime = Ext.Date.add(newTime, Ext.Date.MINUTE, newTime.getTimezoneOffset());
224   - Ext.getCmp('plotPreview-goto-Date' + me.interactiveId).setValue(newTime);
225   - me.panelResultInstance.callInteractivePlot({ 'action': 'instant', 'interactiveId': me.panelResultInstance.interactiveId, 'panelId': me.panelId, 'time': newTime });
  227 + me.panelResultInstance.callInteractivePlot({ 'action': 'instant', 'interactiveId': me.panelResultInstance.interactiveId, 'panelId': me.panelId, 'time': newTime.toISOString()});
226 228 }
227 229 },
228 230 {
... ... @@ -230,9 +232,7 @@ Ext.define('amdaPlotComp.PlotPreviewUI', {
230 232 text : 'Next',
231 233 handler: function(){
232 234 var newTime = new Date(amdaPlotComp.PlotContextManager.getInstantTimeNext(me.crtContext) *1000);
233   - newTime = Ext.Date.add(newTime, Ext.Date.MINUTE, newTime.getTimezoneOffset());
234   - me.panelResultInstance.callInteractivePlot({ 'action': 'instant', 'interactiveId': me.panelResultInstance.interactiveId, 'panelId': me.panelId, 'time': newTime });
235   - Ext.getCmp('plotPreview-goto-Date' + me.interactiveId).setValue(newTime);
  235 + me.panelResultInstance.callInteractivePlot({ 'action': 'instant', 'interactiveId': me.panelResultInstance.interactiveId, 'panelId': me.panelId, 'time': newTime.toISOString()});
236 236 }
237 237 }
238 238 ]
... ...
js/app/views/PlotTabResultUI.js
... ... @@ -332,8 +332,8 @@ Ext.define('amdaUI.PlotTabResultUI', {
332 332 handler: function () {
333 333  
334 334 var crtTime = new Date(crtTimestamp * 1000);
335   - crtTime = Ext.Date.add(crtTime, Ext.Date.MINUTE, crtTime.getTimezoneOffset());
336   - me.callInteractivePlot({ 'action': 'instant', 'interactiveId': this.interactiveId, 'panelId': panel.id, 'time': crtTime });
  335 + //crtTime = Ext.Date.add(crtTime, Ext.Date.MINUTE, crtTime.getTimezoneOffset());
  336 + me.callInteractivePlot({ 'action': 'instant', 'interactiveId': this.interactiveId, 'panelId': panel.id, 'time': crtTime.toISOString()});
337 337 },
338 338 scope: me
339 339 },
... ...