diff --git a/js/app/views/PlotComponents/PlotTabContent.js b/js/app/views/PlotComponents/PlotTabContent.js index ad6bde8..14c4e18 100644 --- a/js/app/views/PlotComponents/PlotTabContent.js +++ b/js/app/views/PlotComponents/PlotTabContent.js @@ -39,6 +39,7 @@ Ext.define('amdaPlotComp.PlotTabContent', { setTime : function(startDate, stopDate) { this.timeSelector.intervalSel.setInterval(startDate, stopDate); + this.timeSelector.setActiveTimeSource(amdaModel.AmdaTimeObject.inputTimeSrc[1]); }, getTimeSelector: function(){ diff --git a/js/app/views/PlotTabResultUI.js b/js/app/views/PlotTabResultUI.js index c88fede..55a627d 100644 --- a/js/app/views/PlotTabResultUI.js +++ b/js/app/views/PlotTabResultUI.js @@ -520,6 +520,22 @@ Ext.define('amdaUI.PlotTabResultUI', { this.callInteractivePlot({'action' : 'goto', 'interactiveId' : this.interactiveId, 'ttFileIndex' : ttFileIndex, 'intIndex' : ttintervalIndex}); } }, + '-', + { + text: 'Use This Time Inteval', + scope: this, + handler: function(){ + var timeObj = new Object(); + var startTime = new Date(this.crtContext.page.startTime*1000); + timeObj.start = Ext.Date.add(startTime, Ext.Date.MINUTE, startTime.getTimezoneOffset()); + + var stopTime = new Date(this.crtContext.page.stopTime*1000); + timeObj.stop = Ext.Date.add(stopTime, Ext.Date.MINUTE, stopTime.getTimezoneOffset()); + + var plotModule = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.plot.id); + plotModule.setTimeInterval(timeObj); + } + }, '-', { text: 'Go to Interval #', diff --git a/js/app/views/TimeSelectorUI.js b/js/app/views/TimeSelectorUI.js index 08c74db..639f924 100644 --- a/js/app/views/TimeSelectorUI.js +++ b/js/app/views/TimeSelectorUI.js @@ -61,6 +61,9 @@ Ext.define('amdaUI.TimeSelectorUI', { getActiveTimeSource: function() { return this.timeSrc.getActiveTab().getItemId(); }, + setActiveTimeSource : function (timeSrcIndex){ + this.timeSrc.setActiveTab(timeSrcIndex); + }, isValid: function(acceptEmptyTTList = true) { if (this.getActiveTimeSource() === amdaModel.AmdaTimeObject.inputTimeSrc[0]) { -- libgit2 0.21.2