Commit c94de8e9e5abbc119cf56815823f0547402d802c

Authored by Benjamin Renard
1 parent 87658ba0

Fix Multi plot time selector size + setTT to correct selector

Showing 2 changed files with 13 additions and 13 deletions   Show diff stats
js/app/views/PlotUI.js
... ... @@ -144,16 +144,13 @@ Ext.define('amdaUI.PlotUI', {
144 144 this.plotTabs.updateTimeObject();
145 145 },
146 146  
147   - addTT : function(newTTName,newTTid)
148   - {
149   - this.timeSelector.addTT(newTTName,newTTid);
  147 + addTT : function(newTTName,newTTid,timeSelectorId)
  148 + {
  149 + var crtTimeSelector = Ext.getCmp(timeSelectorId);
  150 + if (crtTimeSelector)
  151 + crtTimeSelector.addTT(newTTName,newTTid);
150 152 },
151 153  
152   - addTTs : function(TTarray) {
153   - // set TTTab
154   - this.timeSelector.setTTTab(TTarray);
155   - },
156   -
157 154 /**
158 155 * Set Start-Stop from parameter info (Local & MyData)
159 156 */
... ... @@ -171,13 +168,13 @@ Ext.define('amdaUI.PlotUI', {
171 168 },
172 169  
173 170 init : function(config) {
174   - this.timeSelector = new amdaUI.TimeSelectorUI( { id: 'plotTimeSelector' + config.id, flex: 1, title : 'MultiPlot Time Selection'} );
  171 + this.timeSelector = new amdaUI.TimeSelectorUI( { id: 'multiPlotTimeSelector' + config.id, title : 'MultiPlot Time Selection'} );
175 172  
176 173 this.plotOutput = new amdaPlotComp.PlotOutputForm({flex: 2});
177 174  
178 175 this.plotElement = new amdaPlotComp.PlotElementPanel({flex: 3});
179 176  
180   - this.plotTabs = new amdaPlotComp.PlotTabPanel({flex: 2, plotElementPanel : this.plotElement, plotUI : this});
  177 + this.plotTabs = new amdaPlotComp.PlotTabPanel({flex: 3, plotElementPanel : this.plotElement, plotUI : this});
181 178  
182 179 this.optionsPanel = new Ext.form.Panel({
183 180 layout: {
... ... @@ -196,6 +193,7 @@ Ext.define('amdaUI.PlotUI', {
196 193 });
197 194  
198 195 this.multiPlotIntervalPanel = new Ext.form.Panel({
  196 + flex: 2,
199 197 layout: 'fit',
200 198 bodyStyle: { background : '#dfe8f6' },
201 199 visible : false,
... ...
js/app/views/TimeSelectorUI.js
... ... @@ -80,6 +80,8 @@ Ext.define('amdaUI.TimeSelectorUI',
80 80 model: 'amdaModel.TTobject'
81 81 });
82 82  
  83 + var me = this;
  84 +
83 85 this.TTGrid = Ext.create('Ext.grid.Panel',
84 86 {
85 87 itemId: 1,
... ... @@ -97,8 +99,8 @@ Ext.define('amdaUI.TimeSelectorUI',
97 99 ],
98 100 listeners : {
99 101 render : function(o,op) {
100   - var me = this;
101   - var el = me.getEl();
  102 +
  103 + var el = this.getEl();
102 104 var dropTarget = Ext.create('Ext.dd.DropTarget', el, {
103 105 ddGroup: 'explorerTree',
104 106 notifyOver : function(ddSource, e, data)
... ... @@ -124,7 +126,7 @@ Ext.define('amdaUI.TimeSelectorUI',
124 126 var targetModuleId = explorerModule.getPinedModule();
125 127 var targetModule = myDesktopApp.getLoadedModule(targetModuleId);
126 128 if (targetModule)
127   - targetModule.getUiContent().addTT(data.records[0].get('text'),data.records[0].get('id'));
  129 + targetModule.getUiContent().addTT(data.records[0].get('text'),data.records[0].get('id'), me.getId());
128 130 return true;
129 131 }
130 132 });
... ...