diff --git a/js/app/views/PlotTabResultUI.js b/js/app/views/PlotTabResultUI.js index f29a032..219095f 100644 --- a/js/app/views/PlotTabResultUI.js +++ b/js/app/views/PlotTabResultUI.js @@ -5,67 +5,63 @@ * @extends Ext. panel.Panel * @brief Plot Tab Result UI definition (View) * @author - * @version $Id: PlotTabResultUI.js benjamin $ - ******************************************************************************** - * FT Id : Date : Name - Description - ******************************************************************************* - * + * @version $Id: PlotTabResultUI.js benjamin */ Ext.define('amdaUI.PlotTabResultUI', { - extend: 'Ext.panel.Panel', - - alias: 'widget.plotTabResult', + extend: 'Ext.panel.Panel', - requires: [ - 'amdaPlotComp.PlotZoomPlug', - 'amdaPlotComp.PlotExtendShiftPlug', - 'amdaPlotComp.PlotContextManager', - 'amdaPlotComp.PlotResultImage' - ], - - panelImage : null, - crtContext : null, - tabId : '', - multiPlotCheck : null, - navToolBar : null, - isTTNavBar : false, - crtTTFileIndex : 0, - disableSynchronize: false, + alias: 'widget.plotTabResult', + + requires: [ + 'amdaPlotComp.PlotZoomPlug', + 'amdaPlotComp.PlotExtendShiftPlug', + 'amdaPlotComp.PlotContextManager', + 'amdaPlotComp.PlotResultImage' + ], - hiddenForm: null, + panelImage : null, + crtContext : null, + tabId : '', + multiPlotCheck : null, + navToolBar : null, + isTTNavBar : false, + crtTTFileIndex : 0, + disableSynchronize: false, + + hiddenForm: null, - constructor: function(config) { - this.addEvents({'pagesize':true}); - - this.init(config); - this.callParent(arguments); - }, + constructor: function(config) { + this.addEvents({'pagesize':true}); + + this.init(config); + this.callParent(arguments); + }, - getImageSize : function() { - if (!this.crtContext) - return { - width : 0, - height : 0 - }; - - return { - width : this.crtContext.page.width * this.sliderPage.getValue()/100., - height : this.crtContext.page.height * this.sliderPage.getValue()/100. - } - }, + getImageSize : function() { + if (!this.crtContext) + return { + width : 0, + height : 0 + }; + + return { + width : this.crtContext.page.width * this.sliderPage.getValue()/100., + height : this.crtContext.page.height * this.sliderPage.getValue()/100. + } + }, - getImageUrl: function(resultFolder, plotFile) { - return 'data/'+sessionID +'/RES/'+resultFolder+ '/' + plotFile; - }, + getImageUrl: function(resultFolder, plotFile) { + return 'data/'+sessionID +'/RES/'+resultFolder+ '/' + plotFile; + }, - getInteractiveMultiPlotState: function() { - if (!this.multiPlotCheck) - return false; - return this.multiPlotCheck.getValue(); - }, + getInteractiveMultiPlotState: function() { + if (!this.multiPlotCheck) + return false; + return this.multiPlotCheck.getValue(); + }, - toPixelOnSourceImage : function(value) { + toPixelOnSourceImage : function(value) { return value*100/this.sliderPage.getValue(); }, @@ -290,21 +286,21 @@ Ext.define('amdaUI.PlotTabResultUI', { if (panel.plotArea.hasSpectro) { me.contextualMenu.add([ - { - text:'Instant cut at this position', - handler : function () - { - var timeAxisContext = amdaPlotComp.PlotContextManager.getPanelAxisById(panel, 'timeAxis'); - if (timeAxisContext == null) - return; - var crtTimestamp = amdaPlotComp.PlotContextManager.toAxisValue(timeAxisContext, panel.plotArea.x, panel.plotArea.x+panel.plotArea.width, sourceXPos); - var crtTime = new Date(crtTimestamp*1000); - crtTime = Ext.Date.add(crtTime, Ext.Date.MINUTE, crtTime.getTimezoneOffset()); - me.callInteractivePlot({'action' : 'instant', 'tabId' : this.tabId, 'panelId' : panel.id, 'time' : crtTime}); - }, - scope: me - }, - '-' + { + text:'Instant cut at this position', + handler : function () + { + var timeAxisContext = amdaPlotComp.PlotContextManager.getPanelAxisById(panel, 'timeAxis'); + if (timeAxisContext == null) + return; + var crtTimestamp = amdaPlotComp.PlotContextManager.toAxisValue(timeAxisContext, panel.plotArea.x, panel.plotArea.x+panel.plotArea.width, sourceXPos); + var crtTime = new Date(crtTimestamp*1000); + crtTime = Ext.Date.add(crtTime, Ext.Date.MINUTE, crtTime.getTimezoneOffset()); + me.callInteractivePlot({'action' : 'instant', 'tabId' : this.tabId, 'panelId' : panel.id, 'time' : crtTime}); + }, + scope: me + }, + '-' ]); } if (amdaPlotComp.PlotContextManager.isInPlotArea(panel, sourceXPos, sourceYPos)) @@ -315,110 +311,107 @@ Ext.define('amdaUI.PlotTabResultUI', { me.contextualMenu.add('-'); me.contextualMenu.add([ - { - text:'Extend/Shift Time request', - handler : function () - { - var extendShiftPlugin = this.getPlugin('plot-extendshift-plugin-id'); - extendShiftPlugin.show(me.tabId); - }, - scope: me - }, - '-', - { - text: 'Save Plot', - handler : function () - { - if (me.hiddenForm == null) - me.hiddenForm = Ext.create('Ext.form.Panel', { - title:'hiddenForm', - renderTo: Ext.getBody(), - standardSubmit: true, - url: 'php/downloadPlot.php', - timeout: 120000, - height:100, - width: 100, - hidden:true, - items:[ - ] - }); + { + text:'Extend/Shift Time request', + handler : function () + { + var extendShiftPlugin = this.getPlugin('plot-extendshift-plugin-id'); + extendShiftPlugin.show(me.tabId); + }, + scope: me + }, + '-', + { + text: 'Save Plot', + handler : function () + { + if (me.hiddenForm == null) + me.hiddenForm = Ext.create('Ext.form.Panel', { + title:'hiddenForm', + renderTo: Ext.getBody(), + standardSubmit: true, + url: 'php/downloadPlot.php', + timeout: 120000, + height:100, + width: 100, + hidden:true, + items:[] + }); - me.hiddenForm.getForm().submit({ - params: { - sessionId: sessionID, - tabId : me.tabId - }, - success: function(form, action) { - }, - failure: function(form, action) { - } - }); - } - } + me.hiddenForm.getForm().submit({ + params: { + sessionId: sessionID, + tabId : me.tabId + }, + success: function(form, action) {}, + failure: function(form, action) {} + }); + } + } ]); me.contextualMenu.showAt(absoluteX, absoluteY); } - }); + }); - return this.panelImage; - }, + return this.panelImage; + }, - updatePlotImage: function(configResult, newPlot) { - this.crtContext = configResult.context; - - this.crtTTFileIndex = configResult.ttFileIndex; - - if (this.isTTNavBar != (!configResult.isInterval) || (this.isSuperposeMode != this.crtContext.page.superposeMode)) - { - //Update navigation bar - this.updateNavToolBar(!configResult.isInterval, this.crtContext.page.superposeMode); - } - - this.updateTimeTableInfo(); - - if (this.multiPlotCheck) - { - this.disableSynchronize = true; - this.multiPlotCheck.setValue(configResult.multiplot); - this.disableSynchronize = false; - } - - this.panelImage.setSrc(this.getImageUrl(configResult.folder, configResult.plotFile)); - - var size = this.getImageSize(); - this.panelImage.setSize(size.width, size.height); - - this.panelImage.refreshMe(); - }, + updatePlotImage: function(configResult, newPlot) { + this.crtContext = configResult.context; + + this.crtTTFileIndex = configResult.ttFileIndex; + + if (this.isTTNavBar != (!configResult.isInterval) || (this.isSuperposeMode != this.crtContext.page.superposeMode)) + { + //Update navigation bar + this.updateNavToolBar(!configResult.isInterval, this.crtContext.page.superposeMode); + } + + this.updateTimeTableInfo(); + + if (this.multiPlotCheck) + { + this.disableSynchronize = true; + this.multiPlotCheck.setValue(configResult.multiplot); + this.disableSynchronize = false; + } + + this.panelImage.setSrc(this.getImageUrl(configResult.folder, configResult.plotFile)); + + var size = this.getImageSize(); + this.panelImage.setSize(size.width, size.height); + + this.panelImage.refreshMe(); + }, - updateTimeTableInfo: function() - { - if (!this.navToolBar) - return; - - var ttNameField = this.navToolBar.items.get('tt-table-'+this.tabId); - if (ttNameField) - ttNameField.setValue(this.crtContext.page.ttName); - - var ttNumberField = this.navToolBar.items.get('tt-number-'+this.tabId); - if (ttNumberField) - ttNumberField.setValue(this.crtContext.page.ttIndex + 1); - - var ttTotalField = this.navToolBar.items.get('tt-total-'+this.tabId); - if (ttTotalField) - ttTotalField.setValue(this.crtContext.page.ttNbIntervals); - }, + updateTimeTableInfo: function() + { + if (!this.navToolBar) + return; + + var ttNameField = this.navToolBar.items.get('tt-table-'+this.tabId); + if (ttNameField) + ttNameField.setValue(this.crtContext.page.ttName); + + var ttNumberField = this.navToolBar.items.get('tt-number-'+this.tabId); + if (ttNumberField) + ttNumberField.setValue(this.crtContext.page.ttIndex + 1); + + var ttTotalField = this.navToolBar.items.get('tt-total-'+this.tabId); + if (ttTotalField) + ttTotalField.setValue(this.crtContext.page.ttNbIntervals); + }, - callInteractivePlot : function(obj) { - loadMask.show(true); - - var plotModule = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.plot.id); - var multiPlotState = plotModule.getInteractiveMultiPlotState(); - - AmdaAction.interactivePlot(obj, multiPlotState, function (result, e) { - loadMask.hide(); - var t = e.getTransaction(); + callInteractivePlot : function(obj) { + loadMask.show(true); + + var plotModule = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.plot.id); + var multiPlotState = plotModule.getInteractiveMultiPlotState(); + + AmdaAction.interactivePlot(obj, multiPlotState, function (result, e) { + loadMask.hide(); + var t = e.getTransaction(); if (e.status) { if (result) @@ -438,303 +431,291 @@ Ext.define('amdaUI.PlotTabResultUI', { // FAILURE myDesktopApp.errorMsg('Error System - '+e.message); } - },this); - }, - - updateNavToolBar : function(isTimeTable, isSuperposeMode) { - if (this.navToolBar) - this.navToolBar.removeAll(true); - - this.multiPlotCheck = Ext.create('Ext.form.field.Checkbox', { - boxLabel : 'Linked to Multi Plot Mode', - scope: this, - handler: function(check, checked) { - if (!this.disableSynchronize) - this.callInteractivePlot({'action' : 'synchronize', 'tabId' : this.tabId}); - }, - scope: this - }); - - var commonItemsCfg = [ - { - xtype: 'tbspacer', - width: 50 - }, - this.multiPlotCheck, - '->', - { - text: 'Get HST Data', - scope: this, - menu: [ - { - text: 'Giant Planet Auroral Emissions', - scope: this, - handler: function() - { - var me = this; - myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.astro.id, true, function (module) { - var startTime = new Date(me.crtContext.page.startTime*1000); - startTime = Ext.Date.add(startTime, Ext.Date.MINUTE, startTime.getTimezoneOffset()); - - var stopTime = new Date(me.crtContext.page.stopTime*1000); - stopTime = Ext.Date.add(stopTime, Ext.Date.MINUTE, stopTime.getTimezoneOffset()); - - module.createWindow(startTime,stopTime); - }); - } - } - ] - } - ]; - - if (isTimeTable) - { - var navigationItemsCfg = [ - { - text: 'Previous', - scope: this, - handler: function(){ - var ttFileIndex = this.crtTTFileIndex; - var ttintervalIndex = this.crtContext.page.ttIndex; - - if (ttintervalIndex <= 0) - { - if (ttFileIndex <= 0) - { - myDesktopApp.errorMsg('You are on the first interval of your request'); - return; - } - else - { - --ttFileIndex; - ttintervalIndex = 0; - } - } - else - --ttintervalIndex; - this.callInteractivePlot({'action' : 'goto', 'tabId' : this.tabId, 'ttFileIndex' : ttFileIndex, 'intIndex' : ttintervalIndex}); - } - }, - '-', - { - text: 'Next', - scope: this, - handler: function(){ - var ttFileIndex = this.crtTTFileIndex; - var ttintervalIndex = this.crtContext.page.ttIndex; - - if (ttintervalIndex >= this.crtContext.page.ttNbIntervals-1) - { - ++ttFileIndex; - ttintervalIndex = 0; - } - else - ++ttintervalIndex; - this.callInteractivePlot({'action' : 'goto', 'tabId' : this.tabId, 'ttFileIndex' : ttFileIndex, 'intIndex' : ttintervalIndex}); - } - }, - '-', - { - text: 'Go to Interval #', - scope: this, - handler: function(bt){ - var ttGotoNumberField = this.navToolBar.items.get('tt-goto-number-'+this.tabId); - var goToIndex = ttGotoNumberField.getValue() - 1; - if ((goToIndex < 0) || (goToIndex >= this.crtContext.page.ttNbIntervals)) - myDesktopApp.errorMsg('This interval number is outside of the current timeTable'); - else - this.callInteractivePlot({'action' : 'goto', 'tabId' : this.tabId, 'ttFileIndex' : this.crtTTFileIndex, 'intIndex' : goToIndex}); - } - }, - { - xtype: 'numberfield', - id : 'tt-goto-number-'+this.tabId, - hideTrigger: true, - width: 40, - minValue: 1 - }, - ' ', - ' ', - ' ', - { - xtype: 'textfield', - id: 'tt-table-'+this.tabId, - labelAlign: 'right', - labelWidth: 30, - fieldLabel: 'Table', - width: 130, - disabled : true - }, - { - xtype: 'textfield', - id: 'tt-number-'+this.tabId, - labelAlign: 'right', - labelWidth: 30, - fieldLabel: 'Int #', - width: 70, - disabled : true - }, - { - xtype: 'textfield', - id: 'tt-total-'+this.tabId, - labelAlign: 'right', - labelWidth: 30, - fieldLabel: 'Total', - width: 70, - disabled : true - } - ]; - } - else - { - var navigationItemsCfg = [ - { - text: 'Backward', - scope: this, - handler: function(){ - this.callInteractivePlot({'action' : 'backward', 'tabId' : this.tabId}); - } - }, - '-', - { - text: '1/2 Backward', - scope: this, - handler: function(){ - this.callInteractivePlot({'action' : 'halfbackward', 'tabId' : this.tabId}); - } - }, - '-', - { - text: '1/2 Forward', - scope: this, - handler: function(){ - this.callInteractivePlot({'action' : 'halfforward', 'tabId' : this.tabId}); - } - }, - '-', - { - text: 'Forward', - scope: this, - handler: function(){ - this.callInteractivePlot({'action' : 'forward', 'tabId' : this.tabId}); - } - } - ]; - } - - var toolItemsCfg = navigationItemsCfg; - Ext.each(commonItemsCfg, function(item){ - toolItemsCfg.push(item); - }); - - if (!this.navToolBar) - { - var toolConfig = { - dock: 'top', - items: toolItemsCfg - }; - - this.navToolBar = Ext.create('Ext.toolbar.Toolbar', toolConfig); - } - else - this.navToolBar.add(toolItemsCfg); - - this.navToolBar.setDisabled(isSuperposeMode); - - this.isTTNavBar = isTimeTable; - this.isSuperposeMode = isSuperposeMode; - }, + },this); + }, - init: function(configResult){ - this.crtContext = configResult.context; - this.tabId = configResult.tabId; - - this.coordinatesField = new Ext.toolbar.TextItem({ - width: 300, - text : '' - }); - - this.sliderPage = new Ext.slider.Single({ - width: 130, - value: 75, - increment: 5, - minValue: 50, - maxValue: 100, - fieldLabel : 'Resize', - labelWidth : 40, - listeners: { - scope : this, - changecomplete: function(s, v) - { - var zoomPlugin = this.getPlugin('plot-zoom-plugin-id'); - zoomPlugin.close(); - var size = this.getImageSize(); - this.panelImage.width = size.width; - this.panelImage.height = size.height; - this.panelImage.doComponentLayout(); - this.fireEvent('pagesize',this,v); - } - } - }); - - var mouseToolbar = { - xtype: 'toolbar', - height: 25, - dock: 'bottom', - items:[ - this.coordinatesField, - '->', - this.sliderPage - ] - }; + updateNavToolBar : function(isTimeTable, isSuperposeMode) { + if (this.navToolBar) + this.navToolBar.removeAll(true); + + this.multiPlotCheck = Ext.create('Ext.form.field.Checkbox', { + boxLabel : 'Linked to Multi Plot Mode', + scope: this, + handler: function(check, checked) { + if (!this.disableSynchronize) + this.callInteractivePlot({'action' : 'synchronize', 'tabId' : this.tabId}); + }, + scope: this + }); + + var commonItemsCfg = [ + { + xtype: 'tbspacer', + width: 50 + }, + this.multiPlotCheck, + '->', + { + text: 'Get HST Data', + scope: this, + menu: [ + { + text: 'Giant Planet Auroral Emissions', + scope: this, + handler: function() + { + var me = this; + myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.astro.id, true, function (module) { + var startTime = new Date(me.crtContext.page.startTime*1000); + startTime = Ext.Date.add(startTime, Ext.Date.MINUTE, startTime.getTimezoneOffset()); + + var stopTime = new Date(me.crtContext.page.stopTime*1000); + stopTime = Ext.Date.add(stopTime, Ext.Date.MINUTE, stopTime.getTimezoneOffset()); + + module.createWindow(startTime,stopTime); + }); + } + }] + }]; + + if (isTimeTable){ + var navigationItemsCfg = [{ + text: 'Previous', + scope: this, + handler: function(){ + var ttFileIndex = this.crtTTFileIndex; + var ttintervalIndex = this.crtContext.page.ttIndex; + + if (ttintervalIndex <= 0){ + if (ttFileIndex <= 0){ + myDesktopApp.errorMsg('You are on the first interval of your request'); + return; + } + else { + --ttFileIndex; + ttintervalIndex = 0; + } + } + else + --ttintervalIndex; + this.callInteractivePlot({'action' : 'goto', 'tabId' : this.tabId, 'ttFileIndex' : ttFileIndex, 'intIndex' : ttintervalIndex}); + } + }, + '-', + { + text: 'Next', + scope: this, + handler: function(){ + var ttFileIndex = this.crtTTFileIndex; + var ttintervalIndex = this.crtContext.page.ttIndex; + + if (ttintervalIndex >= this.crtContext.page.ttNbIntervals-1){ + ++ttFileIndex; + ttintervalIndex = 0; + } + else + ++ttintervalIndex; + + this.callInteractivePlot({'action' : 'goto', 'tabId' : this.tabId, 'ttFileIndex' : ttFileIndex, 'intIndex' : ttintervalIndex}); + } + }, + '-', + { + text: 'Go to Interval #', + scope: this, + handler: function(bt){ + var ttGotoNumberField = this.navToolBar.items.get('tt-goto-number-'+this.tabId); + var goToIndex = ttGotoNumberField.getValue() - 1; + if ((goToIndex < 0) || (goToIndex >= this.crtContext.page.ttNbIntervals)) + myDesktopApp.errorMsg('This interval number is outside of the current timeTable'); + else + this.callInteractivePlot({'action' : 'goto', 'tabId' : this.tabId, 'ttFileIndex' : this.crtTTFileIndex, 'intIndex' : goToIndex}); + } + }, + { + xtype: 'numberfield', + id : 'tt-goto-number-'+this.tabId, + hideTrigger: true, + width: 50, + minValue: 1 + }, + ' ', + ' ', + ' ', + { + xtype: 'textfield', + id: 'tt-table-'+this.tabId, + labelAlign: 'right', + labelWidth: 30, + fieldLabel: 'Table', + width: 130, + disabled : true + }, + { + xtype: 'textfield', + id: 'tt-number-'+this.tabId, + labelAlign: 'right', + labelWidth: 30, + fieldLabel: 'Int #', + width: 90, + disabled : true + }, + { + xtype: 'textfield', + id: 'tt-total-'+this.tabId, + labelAlign: 'right', + labelWidth: 30, + fieldLabel: 'Total', + width: 90, + disabled : true + }]; + } + else + { + var navigationItemsCfg = [ + { + text: 'Backward', + scope: this, + handler: function(){ + this.callInteractivePlot({'action' : 'backward', 'tabId' : this.tabId}); + } + }, + '-', + { + text: '1/2 Backward', + scope: this, + handler: function(){ + this.callInteractivePlot({'action' : 'halfbackward', 'tabId' : this.tabId}); + } + }, + '-', + { + text: '1/2 Forward', + scope: this, + handler: function(){ + this.callInteractivePlot({'action' : 'halfforward', 'tabId' : this.tabId}); + } + }, + '-', + { + text: 'Forward', + scope: this, + handler: function(){ + this.callInteractivePlot({'action' : 'forward', 'tabId' : this.tabId}); + } + }]; + } + + var toolItemsCfg = navigationItemsCfg; + Ext.each(commonItemsCfg, function(item){ + toolItemsCfg.push(item); + }); + + if (!this.navToolBar) + { + var toolConfig = { + dock: 'top', + items: toolItemsCfg + }; + + this.navToolBar = Ext.create('Ext.toolbar.Toolbar', toolConfig); + } + else + this.navToolBar.add(toolItemsCfg); + + this.navToolBar.setDisabled(isSuperposeMode); + + this.isTTNavBar = isTimeTable; + this.isSuperposeMode = isSuperposeMode; + }, + + init: function(configResult){ + this.crtContext = configResult.context; + this.tabId = configResult.tabId; + + this.coordinatesField = new Ext.toolbar.TextItem({ + width: 300, + text : '' + }); + + this.sliderPage = new Ext.slider.Single({ + width: 130, + value: 75, + increment: 5, + minValue: 50, + maxValue: 100, + fieldLabel : 'Resize', + labelWidth : 40, + listeners: { + scope : this, + changecomplete: function(s, v) + { + var zoomPlugin = this.getPlugin('plot-zoom-plugin-id'); + zoomPlugin.close(); + var size = this.getImageSize(); + this.panelImage.width = size.width; + this.panelImage.height = size.height; + this.panelImage.doComponentLayout(); + this.fireEvent('pagesize',this,v); + } + } + }); + + var mouseToolbar = { + xtype: 'toolbar', + height: 25, + dock: 'bottom', + items:[ + this.coordinatesField, + '->', + this.sliderPage + ] + }; - this.contextualMenu = Ext.create('Ext.menu.Menu', { - width: 200, - plain: true, - items: [] - }); - - this.updateNavToolBar(!configResult.isInterval, this.crtContext.page.superposeMode); - - this.updateTimeTableInfo(); - - if (this.multiPlotCheck) - { - this.disableSynchronize = true; - this.multiPlotCheck.setValue(configResult.multiplot); - this.disableSynchronize = false; - } - - var plotResultTabPanelConfig = { - preventHeader : true, - autoScroll: true, - items: [ - this.createPlotImage(configResult.folder, configResult.plotFile) - ], - dockedItems: [this.navToolBar, mouseToolbar], - plugins: [ - { - ptype: 'plotZoomPlugin', - pluginId : 'plot-zoom-plugin-id' - }, - { - ptype: 'plotExtendShiftPlugin', - pluginId : 'plot-extendshift-plugin-id' - } - ], - listeners: { - scope : this, - destroy : function () { - var zoomPlugin = this.getPlugin('plot-zoom-plugin-id'); - if (zoomPlugin) - zoomPlugin.close(); - var exttendShiftPlugin = this.getPlugin('plot-extendshift-plugin-id'); - if (exttendShiftPlugin) - exttendShiftPlugin.close(); - } - } - }; - - Ext.apply(this , plotResultTabPanelConfig); - } -}); \ No newline at end of file + this.contextualMenu = Ext.create('Ext.menu.Menu', { + width: 200, + plain: true, + items: [] + }); + + this.updateNavToolBar(!configResult.isInterval, this.crtContext.page.superposeMode); + + this.updateTimeTableInfo(); + + if (this.multiPlotCheck) + { + this.disableSynchronize = true; + this.multiPlotCheck.setValue(configResult.multiplot); + this.disableSynchronize = false; + } + + var plotResultTabPanelConfig = { + preventHeader : true, + autoScroll: true, + items: [ this.createPlotImage(configResult.folder, configResult.plotFile)], + dockedItems: [this.navToolBar, mouseToolbar], + plugins: [ + { + ptype: 'plotZoomPlugin', + pluginId : 'plot-zoom-plugin-id' + }, + { + ptype: 'plotExtendShiftPlugin', + pluginId : 'plot-extendshift-plugin-id' + }], + listeners: { + scope : this, + destroy : function () { + var zoomPlugin = this.getPlugin('plot-zoom-plugin-id'); + if (zoomPlugin) + zoomPlugin.close(); + var exttendShiftPlugin = this.getPlugin('plot-extendshift-plugin-id'); + if (exttendShiftPlugin) + exttendShiftPlugin.close(); + } + } + }; + + Ext.apply(this , plotResultTabPanelConfig); + } +}); -- libgit2 0.21.2