diff --git a/js/app/controllers/PlotModule.js b/js/app/controllers/PlotModule.js index b679a3c..8869865 100644 --- a/js/app/controllers/PlotModule.js +++ b/js/app/controllers/PlotModule.js @@ -201,6 +201,21 @@ Ext.define('amdaDesktop.PlotModule', { if (!this.plotResultWindowsManager.get(winResultId)) return null; return this.plotResultWindowsManager.get(winResultId); }, + + setTimeInterval : function(timeObj){ + var me = this; + var desktop = this.app.getDesktop(); + var win = desktop.getWindow(this.id); + if (win) { + me.getUiContent().setTimeFromData(timeObj); + win.show(); + } + else { + this.createWindow(function () { + me.getUiContent().setTimeFromData(timeObj); + }); + } + }, addParameter : function(paramNode) { var me = this; diff --git a/js/app/views/PlotComponents/PlotZoomPlug.js b/js/app/views/PlotComponents/PlotZoomPlug.js index b100c4d..110dda9 100644 --- a/js/app/views/PlotComponents/PlotZoomPlug.js +++ b/js/app/views/PlotComponents/PlotZoomPlug.js @@ -193,7 +193,13 @@ Ext.define('amdaPlotComp.PlotZoomPlug', { this.hostCmp.panelImage.resetZoom(); }, - + setTimePlot : function(){ + var timeObj = new Object(); + timeObj.start = this.form.getForm().findField('zoom-min-time').getValue(); + timeObj.stop = this.form.getForm().findField('zoom-max-time').getValue(); + var plotModule = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.plot.id); + plotModule.setTimeInterval(timeObj); + }, /** * Main form */ @@ -232,6 +238,15 @@ Ext.define('amdaPlotComp.PlotZoomPlug', { handler: function () { this.resetMinMaxValue(); } + }, + { + xtype: 'button', + width: 100, + text: 'Use interval in plot', + scope: this, + handler: function () { + this.setTimePlot(); + } } ] }; -- libgit2 0.21.2