Commit 67210d01af455923cbba8bc60f83bc4c365a468b

Authored by Hacene SI HADJ MOHAND
1 parent e5ea39d5

#9800

js/app/controllers/PlotModule.js
... ... @@ -201,6 +201,21 @@ Ext.define('amdaDesktop.PlotModule', {
201 201 if (!this.plotResultWindowsManager.get(winResultId)) return null;
202 202 return this.plotResultWindowsManager.get(winResultId);
203 203 },
  204 +
  205 + setTimeInterval : function(timeObj){
  206 + var me = this;
  207 + var desktop = this.app.getDesktop();
  208 + var win = desktop.getWindow(this.id);
  209 + if (win) {
  210 + me.getUiContent().setTimeFromData(timeObj);
  211 + win.show();
  212 + }
  213 + else {
  214 + this.createWindow(function () {
  215 + me.getUiContent().setTimeFromData(timeObj);
  216 + });
  217 + }
  218 + },
204 219  
205 220 addParameter : function(paramNode) {
206 221 var me = this;
... ...
js/app/views/PlotComponents/PlotZoomPlug.js
... ... @@ -193,7 +193,13 @@ Ext.define('amdaPlotComp.PlotZoomPlug', {
193 193  
194 194 this.hostCmp.panelImage.resetZoom();
195 195 },
196   -
  196 + setTimePlot : function(){
  197 + var timeObj = new Object();
  198 + timeObj.start = this.form.getForm().findField('zoom-min-time').getValue();
  199 + timeObj.stop = this.form.getForm().findField('zoom-max-time').getValue();
  200 + var plotModule = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.plot.id);
  201 + plotModule.setTimeInterval(timeObj);
  202 + },
197 203 /**
198 204 * Main form
199 205 */
... ... @@ -232,6 +238,15 @@ Ext.define('amdaPlotComp.PlotZoomPlug', {
232 238 handler: function () {
233 239 this.resetMinMaxValue();
234 240 }
  241 + },
  242 + {
  243 + xtype: 'button',
  244 + width: 100,
  245 + text: 'Use interval in plot',
  246 + scope: this,
  247 + handler: function () {
  248 + this.setTimePlot();
  249 + }
235 250 }
236 251 ]
237 252 };
... ...