Commit 10ac375fec5e7b48d9a5c05edd7d7209264a1331
Exists in
master
and in
111 other branches
updated Merge branch 'master' of https://gitlab.irap.omp.eu/CDPP/AMDA_IHM
Showing
25 changed files
with
779 additions
and
318 deletions
Show diff stats
js/app/controllers/PlotModule.js
... | ... | @@ -61,7 +61,7 @@ Ext.define('amdaDesktop.PlotModule', { |
61 | 61 | return size; |
62 | 62 | }, |
63 | 63 | |
64 | - updateInteractiveSession : function(session) { | |
64 | + updateInteractiveSession : function(session, newplot) { | |
65 | 65 | var me = this; |
66 | 66 | Ext.each(session.result, function (tabResult, index) { |
67 | 67 | var winResultId = tabResult.id+"-win"; |
... | ... | @@ -72,7 +72,14 @@ Ext.define('amdaDesktop.PlotModule', { |
72 | 72 | folder : session.folder, |
73 | 73 | plotFile : tabResult.plot, |
74 | 74 | context : tabResult.context, |
75 | - tabId : tabResult.id | |
75 | + tabId : tabResult.id, | |
76 | + multiplot : tabResult.multiplot, | |
77 | + superposeMode : tabResult.superposeMode, | |
78 | + isInterval: tabResult.isInterval, | |
79 | + ttName : tabResult.ttName, | |
80 | + ttIndex : tabResult.ttIndex, | |
81 | + ttNbIntervals : tabResult.ttNbIntervals, | |
82 | + ttFileIndex : tabResult.ttFileIndex | |
76 | 83 | }; |
77 | 84 | |
78 | 85 | if (winResult == null) { |
... | ... | @@ -83,7 +90,7 @@ Ext.define('amdaDesktop.PlotModule', { |
83 | 90 | |
84 | 91 | var win = myDesktopApp.getDesktop().createWindow({ |
85 | 92 | id : tabResult.id+"-win", |
86 | - title : 'Plot '+(index+1), | |
93 | + title : 'Plot '+(tabResult.index+1), | |
87 | 94 | width : size.width, |
88 | 95 | height: size.height, |
89 | 96 | layout: 'fit', |
... | ... | @@ -106,7 +113,7 @@ Ext.define('amdaDesktop.PlotModule', { |
106 | 113 | else |
107 | 114 | { |
108 | 115 | //update result |
109 | - winResult.getPanelResult().updatePlotImage(plotTabConfig); | |
116 | + winResult.getPanelResult().updatePlotImage(plotTabConfig, newplot); | |
110 | 117 | //update window size |
111 | 118 | var size = me.computeResultWindowSize(winResult.getPanelResult()); |
112 | 119 | winResult.setSize(size.width, size.height); | ... | ... |
js/app/models/ExecutableNode.js
... | ... | @@ -80,7 +80,7 @@ Ext.define('amdaModel.ExecutableNode', { |
80 | 80 | if (isInteractivePlot) |
81 | 81 | { |
82 | 82 | myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.plot.id, true, function (module) { |
83 | - module.updateInteractiveSession(res); | |
83 | + module.updateInteractiveSession(res, true); | |
84 | 84 | }); |
85 | 85 | } |
86 | 86 | else | ... | ... |
... | ... | @@ -0,0 +1,176 @@ |
1 | +/** | |
2 | + * Projectย : AMDA-NG | |
3 | + * Name : PlotBaseSerieObject.js | |
4 | + * @class amdaPlotObj.PlotBaseSerieObject | |
5 | + * @extends Ext.data.Model | |
6 | + * @brief Plot Base Serie Business Object Definition | |
7 | + * @author Benjamin Renard | |
8 | + * @version $Id: PlotBaseSerieObject.js benjamin $ | |
9 | + ****************************************************************************** | |
10 | + * FT Id : Date : Name - Description | |
11 | + ****************************************************************************** | |
12 | + * : :14/09/2015: BRE - file creation | |
13 | + */ | |
14 | + | |
15 | + | |
16 | +Ext.define('amdaPlotObj.PlotBaseSerieObject', { | |
17 | + extend: 'Ext.data.Model', | |
18 | + | |
19 | + requires: [ | |
20 | + 'amdaPlotObj.PlotObjectConfig' | |
21 | + ], | |
22 | + | |
23 | + fields : [ | |
24 | + {name: 'serie-yaxis', type: 'string'}, | |
25 | + {name: 'serie-lines-activated', type: 'boolean'}, | |
26 | + {name: 'serie-lines-style', type: 'string'}, | |
27 | + {name: 'serie-lines-width', type: 'float'}, | |
28 | + {name: 'serie-lines-color', type: 'string'}, | |
29 | + {name: 'serie-symbols-activated', type: 'boolean'}, | |
30 | + {name: 'serie-symbols-type', type: 'string'}, | |
31 | + {name: 'serie-symbols-size', type: 'float'}, | |
32 | + {name: 'serie-symbols-color', type: 'string'}, | |
33 | + {name: 'serie-colored-param', type: 'string'}, | |
34 | + | |
35 | + //Time tick | |
36 | + {name: 'serie-timetick-activated', type: 'boolean'}, | |
37 | + {name: 'serie-timetick-type', type: 'string'}, | |
38 | + {name: 'serie-timetick-step', type: 'float'}, | |
39 | + {name: 'serie-timetick-nbmajor', type: 'int'}, | |
40 | + {name: 'serie-timetick-nbminor', type: 'int'}, | |
41 | + {name: 'serie-timetick-color', type: 'string'}, | |
42 | + {name: 'serie-timetick-symbols-type', type: 'string'}, | |
43 | + {name: 'serie-timetick-symbols-size', type: 'float'}, | |
44 | + {name: 'serie-timetick-symbols-color', type: 'string'}, | |
45 | + {name: 'serie-timetick-firstsymbols-activated', type: 'boolean'}, | |
46 | + {name: 'serie-timetick-firstsymbols-type', type: 'string'}, | |
47 | + {name: 'serie-timetick-firstsymbols-size', type: 'float'}, | |
48 | + {name: 'serie-timetick-firstsymbols-color', type: 'string'}, | |
49 | + {name: 'serie-timetick-font-activated', type: 'boolean'}, | |
50 | + {name: 'serie-timetick-font-name', type: 'string'}, | |
51 | + {name: 'serie-timetick-font-size', type: 'int'}, | |
52 | + {name: 'serie-timetick-font-bold', type: 'boolean'}, | |
53 | + {name: 'serie-timetick-font-italic', type: 'boolean'}, | |
54 | + | |
55 | + //Interval tick | |
56 | + {name: 'serie-intervaltick-activated', type: 'boolean'}, | |
57 | + {name: 'serie-intervaltick-mode', type: 'string'}, | |
58 | + {name: 'serie-intervaltick-color', type: 'string'}, | |
59 | + {name: 'serie-intervaltick-symbols-type', type: 'string'}, | |
60 | + {name: 'serie-intervaltick-symbols-size', type: 'float'}, | |
61 | + {name: 'serie-intervaltick-symbols-color', type: 'string'}, | |
62 | + {name: 'serie-intervaltick-font-activated', type: 'boolean'}, | |
63 | + {name: 'serie-intervaltick-font-name', type: 'string'}, | |
64 | + {name: 'serie-intervaltick-font-size', type: 'int'}, | |
65 | + {name: 'serie-intervaltick-font-bold', type: 'boolean'}, | |
66 | + {name: 'serie-intervaltick-font-italic', type: 'boolean'}, | |
67 | + ], | |
68 | + | |
69 | + constructor: function(){ | |
70 | + var me = this; | |
71 | + me.callParent(arguments); | |
72 | + if ((arguments.length > 0) && arguments[0]) | |
73 | + { | |
74 | + } | |
75 | + else | |
76 | + { | |
77 | + //new object, set default fields values | |
78 | + me.setDefaultValues(); | |
79 | + } | |
80 | + this.dirty = false; | |
81 | + }, | |
82 | + | |
83 | + setDefaultValues: function() | |
84 | + { | |
85 | + this.set('serie-yaxis', amdaPlotObj.PlotObjectConfig.defaultValues.serie.yAxis); | |
86 | + this.set('serie-lines-activated', true); | |
87 | + this.set('serie-lines-style', amdaPlotObj.PlotObjectConfig.defaultValues.serie.lines.style); | |
88 | + this.set('serie-lines-width', amdaPlotObj.PlotObjectConfig.defaultValues.serie.lines.width); | |
89 | + this.set('serie-lines-color', amdaPlotObj.PlotObjectConfig.defaultValues.serie.lines.color); | |
90 | + this.set('serie-symbols-activated', false); | |
91 | + this.set('serie-symbols-type', amdaPlotObj.PlotObjectConfig.defaultValues.serie.symbols.type); | |
92 | + this.set('serie-symbols-size', amdaPlotObj.PlotObjectConfig.defaultValues.serie.symbols.size); | |
93 | + this.set('serie-symbols-color', amdaPlotObj.PlotObjectConfig.defaultValues.serie.symbols.color); | |
94 | + this.set('serie-colored-param', ''); | |
95 | + | |
96 | + this.set('serie-timetick-activated', false); | |
97 | + this.set('serie-timetick-type', amdaPlotObj.PlotObjectConfig.defaultValues.serie.timetick.type); | |
98 | + this.set('serie-timetick-step', amdaPlotObj.PlotObjectConfig.defaultValues.serie.timetick.step); | |
99 | + this.set('serie-timetick-nbmajor', amdaPlotObj.PlotObjectConfig.defaultValues.serie.timetick.nbmajor); | |
100 | + this.set('serie-timetick-nbminor', amdaPlotObj.PlotObjectConfig.defaultValues.serie.timetick.nbminor); | |
101 | + this.set('serie-timetick-color', amdaPlotObj.PlotObjectConfig.defaultValues.serie.timetick.color); | |
102 | + this.set('serie-timetick-symbols-type', amdaPlotObj.PlotObjectConfig.defaultValues.serie.timetick.symbols.type); | |
103 | + this.set('serie-timetick-symbols-size', amdaPlotObj.PlotObjectConfig.defaultValues.serie.timetick.symbols.size); | |
104 | + this.set('serie-timetick-symbols-color', amdaPlotObj.PlotObjectConfig.defaultValues.serie.timetick.symbols.color); | |
105 | + this.set('serie-timetick-firstsymbols-activated', true); | |
106 | + this.set('serie-timetick-firstsymbols-type', amdaPlotObj.PlotObjectConfig.defaultValues.serie.timetick.firstsymbols.type); | |
107 | + this.set('serie-timetick-firstsymbols-size', amdaPlotObj.PlotObjectConfig.defaultValues.serie.timetick.firstsymbols.size); | |
108 | + this.set('serie-timetick-firstsymbols-color', amdaPlotObj.PlotObjectConfig.defaultValues.serie.timetick.firstsymbols.color); | |
109 | + this.set('serie-timetick-font-activated', false); | |
110 | + this.set('serie-timetick-font-name', amdaPlotObj.PlotObjectConfig.defaultValues.serie.timetick.font.name); | |
111 | + this.set('serie-timetick-font-size', amdaPlotObj.PlotObjectConfig.defaultValues.serie.timetick.font.size); | |
112 | + this.set('serie-timetick-font-bold', false); | |
113 | + this.set('serie-timetick-font-italic', false); | |
114 | + | |
115 | + this.set('serie-intervaltick-activated', false); | |
116 | + this.set('serie-intervaltick-mode', amdaPlotObj.PlotObjectConfig.defaultValues.serie.intervaltick.mode); | |
117 | + this.set('serie-intervaltick-color', amdaPlotObj.PlotObjectConfig.defaultValues.serie.intervaltick.color); | |
118 | + this.set('serie-intervaltick-symbols-type', amdaPlotObj.PlotObjectConfig.defaultValues.serie.intervaltick.symbols.type); | |
119 | + this.set('serie-intervaltick-symbols-size', amdaPlotObj.PlotObjectConfig.defaultValues.serie.intervaltick.symbols.size); | |
120 | + this.set('serie-intervaltick-symbols-color', amdaPlotObj.PlotObjectConfig.defaultValues.serie.intervaltick.symbols.color); | |
121 | + this.set('serie-intervaltick-font-activated', false); | |
122 | + this.set('serie-intervaltick-font-name', amdaPlotObj.PlotObjectConfig.defaultValues.serie.intervaltick.font.name); | |
123 | + this.set('serie-intervaltick-font-size', amdaPlotObj.PlotObjectConfig.defaultValues.serie.intervaltick.font.size); | |
124 | + this.set('serie-intervaltick-font-bold', false); | |
125 | + this.set('serie-intervaltick-font-italic', false); | |
126 | + }, | |
127 | + | |
128 | + getJsonValues : function() | |
129 | + { | |
130 | + var serieValues = new Object(); | |
131 | + | |
132 | + serieValues['serie-yaxis'] = this.get('serie-yaxis'); | |
133 | + serieValues['serie-lines-activated'] = this.get('serie-lines-activated'); | |
134 | + serieValues['serie-lines-style'] = this.get('serie-lines-style'); | |
135 | + serieValues['serie-lines-width'] = this.get('serie-lines-width'); | |
136 | + serieValues['serie-lines-color'] = this.get('serie-lines-color'); | |
137 | + serieValues['serie-symbols-activated'] = this.get('serie-symbols-activated'); | |
138 | + serieValues['serie-symbols-type'] = this.get('serie-symbols-type'); | |
139 | + serieValues['serie-symbols-size'] = this.get('serie-symbols-size'); | |
140 | + serieValues['serie-symbols-color'] = this.get('serie-symbols-color'); | |
141 | + serieValues['serie-colored-param'] = this.get('serie-colored-param'); | |
142 | + | |
143 | + serieValues['serie-timetick-activated'] = this.get('serie-timetick-activated'); | |
144 | + serieValues['serie-timetick-type'] = this.get('serie-timetick-type'); | |
145 | + serieValues['serie-timetick-step'] = this.get('serie-timetick-step'); | |
146 | + serieValues['serie-timetick-nbmajor'] = this.get('serie-timetick-nbmajor'); | |
147 | + serieValues['serie-timetick-nbminor'] = this.get('serie-timetick-nbminor'); | |
148 | + serieValues['serie-timetick-color'] = this.get('serie-timetick-color'); | |
149 | + serieValues['serie-timetick-symbols-type'] = this.get('serie-timetick-symbols-type'); | |
150 | + serieValues['serie-timetick-symbols-size'] = this.get('serie-timetick-symbols-size'); | |
151 | + serieValues['serie-timetick-symbols-color'] = this.get('serie-timetick-symbols-color'); | |
152 | + serieValues['serie-timetick-firstsymbols-activated'] = this.get('serie-timetick-firstsymbols-activated'); | |
153 | + serieValues['serie-timetick-firstsymbols-type'] = this.get('serie-timetick-firstsymbols-type'); | |
154 | + serieValues['serie-timetick-firstsymbols-size'] = this.get('serie-timetick-firstsymbols-size'); | |
155 | + serieValues['serie-timetick-firstsymbols-color'] = this.get('serie-timetick-firstsymbols-color'); | |
156 | + serieValues['serie-timetick-font-activated'] = this.get('serie-timetick-font-activated'); | |
157 | + serieValues['serie-timetick-font-name'] = this.get('serie-timetick-font-name'); | |
158 | + serieValues['serie-timetick-font-size'] = this.get('serie-timetick-font-size'); | |
159 | + serieValues['serie-timetick-font-bold'] = this.get('serie-timetick-font-bold'); | |
160 | + serieValues['serie-timetick-font-italic'] = this.get('serie-timetick-font-italic'); | |
161 | + | |
162 | + serieValues['serie-intervaltick-activated'] = this.get('serie-intervaltick-activated'); | |
163 | + serieValues['serie-intervaltick-mode'] = this.get('serie-intervaltick-mode'); | |
164 | + serieValues['serie-intervaltick-color'] = this.get('serie-intervaltick-color'); | |
165 | + serieValues['serie-intervaltick-symbols-type'] = this.get('serie-intervaltick-symbols-type'); | |
166 | + serieValues['serie-intervaltick-symbols-size'] = this.get('serie-intervaltick-symbols-size'); | |
167 | + serieValues['serie-intervaltick-symbols-color'] = this.get('serie-intervaltick-symbols-color'); | |
168 | + serieValues['serie-intervaltick-font-activated'] = this.get('serie-intervaltick-font-activated'); | |
169 | + serieValues['serie-intervaltick-font-name'] = this.get('serie-intervaltick-font-name'); | |
170 | + serieValues['serie-intervaltick-font-size'] = this.get('serie-intervaltick-font-size'); | |
171 | + serieValues['serie-intervaltick-font-bold'] = this.get('serie-intervaltick-font-bold'); | |
172 | + serieValues['serie-intervaltick-font-italic'] = this.get('serie-intervaltick-font-italic'); | |
173 | + | |
174 | + return serieValues; | |
175 | + } | |
176 | +}); | |
0 | 177 | \ No newline at end of file | ... | ... |
js/app/models/PlotObjects/PlotObjectConfig.js
... | ... | @@ -112,7 +112,29 @@ Ext.define('amdaPlotObj.PlotObjectConfig', { |
112 | 112 | name : 'sans-serif', |
113 | 113 | size: '12' |
114 | 114 | } |
115 | - } | |
115 | + }, | |
116 | + intervaltick : { | |
117 | + mode: 'start-time', | |
118 | + color : '#FF0000', | |
119 | + symbols : { | |
120 | + type: 'full-circle', | |
121 | + size: 10, | |
122 | + color: '#FF0000' | |
123 | + }, | |
124 | + font : { | |
125 | + name : 'sans-serif', | |
126 | + size: '12' | |
127 | + } | |
128 | + }, | |
129 | + errorbar : { | |
130 | + type: 'min-max', | |
131 | + lines : { | |
132 | + style : 'plain', | |
133 | + width : 1, | |
134 | + color : 'auto' | |
135 | + } | |
136 | + }, | |
137 | + projection : 'XY' | |
116 | 138 | }, |
117 | 139 | spectro : { |
118 | 140 | yAxis : 'y-left' |
... | ... | @@ -339,6 +361,15 @@ Ext.define('amdaPlotObj.PlotObjectConfig', { |
339 | 361 | {'key' : 'yparam', 'value' : 'Y Parameter'} |
340 | 362 | ], |
341 | 363 | |
364 | + availableOrbitSerieProjections : [ | |
365 | + {'key' : 'XY', 'value' : 'XY'}, | |
366 | + {'key' : 'XZ', 'value' : 'XZ'}, | |
367 | + {'key' : 'YZ', 'value' : 'YZ'}, | |
368 | + {'key' : 'XR', 'value' : 'XR'}, | |
369 | + {'key' : 'YR', 'value' : 'YR'}, | |
370 | + {'key' : 'ZR', 'value' : 'ZR'} | |
371 | + ], | |
372 | + | |
342 | 373 | availableDimsOnXAxis : [ |
343 | 374 | {'key' : '0', 'value' : 'First dimension'}, |
344 | 375 | {'key' : '1', 'value' : 'Second dimension'} |
... | ... | @@ -349,6 +380,18 @@ Ext.define('amdaPlotObj.PlotObjectConfig', { |
349 | 380 | {'key' : 'time-step', 'value' : 'Time step'}, |
350 | 381 | {'key' : 'nb-major', 'value' : 'Num. of major symb.'} |
351 | 382 | ], |
383 | + | |
384 | + availableIntervalTickModes : [ | |
385 | + {'key' : 'symbol-only', 'value' : 'Symbol only'}, | |
386 | + {'key' : 'interval-index', 'value' : 'Interval index'}, | |
387 | + {'key' : 'start-time', 'value' : 'Start time'}, | |
388 | + {'key' : 'start-stop-time', 'value' : 'Start/Stop times'} | |
389 | + ], | |
390 | + | |
391 | + availableErrorBarTypes : [ | |
392 | + {'key' : 'min-max', 'value' : 'Min./Max. Parameters'}, | |
393 | + {'key' : 'delta', 'value' : 'Delta parameter'} | |
394 | + ], | |
352 | 395 | |
353 | 396 | availableLegendSeriesTypes : [ |
354 | 397 | {'key' : 'text-line-symbol', 'value' : 'Text, Line & Symbols'}, | ... | ... |
... | ... | @@ -0,0 +1,42 @@ |
1 | +/** | |
2 | + * Projectย : AMDA-NG | |
3 | + * Name : PlotOrbitSerieObject.js | |
4 | + * @class amdaPlotObj.PlotOrbitSerieObject | |
5 | + * @extends amdaPlotObj.PlotBaseSerieObject | |
6 | + * @brief Plot Orbit Serie Business Object Definition | |
7 | + * @author Benjamin Renard | |
8 | + * @version $Id: PlotOrbitSerieObject.js benjamin $ | |
9 | + ****************************************************************************** | |
10 | + * FT Id : Date : Name - Description | |
11 | + ****************************************************************************** | |
12 | + * : :14/09/2015: BRE - file creation | |
13 | + */ | |
14 | + | |
15 | + | |
16 | +Ext.define('amdaPlotObj.PlotOrbitSerieObject', { | |
17 | + extend: 'amdaPlotObj.PlotBaseSerieObject', | |
18 | + | |
19 | + fields : [ | |
20 | + {name: 'serie-projection', type: 'string'} | |
21 | + ], | |
22 | + | |
23 | + constructor: function(){ | |
24 | + var me = this; | |
25 | + me.callParent(arguments); | |
26 | + }, | |
27 | + | |
28 | + setDefaultValues: function() | |
29 | + { | |
30 | + this.set('serie-projection', amdaPlotObj.PlotObjectConfig.defaultValues.serie.projection); | |
31 | + this.callParent(arguments); | |
32 | + }, | |
33 | + | |
34 | + getJsonValues : function() | |
35 | + { | |
36 | + var serieValues = this.callParent(arguments); | |
37 | + | |
38 | + serieValues['serie-projection'] = this.get('serie-projection'); | |
39 | + | |
40 | + return serieValues; | |
41 | + } | |
42 | +}); | |
0 | 43 | \ No newline at end of file | ... | ... |
js/app/models/PlotObjects/PlotParamObject.js
... | ... | @@ -20,6 +20,7 @@ Ext.define('amdaPlotObj.PlotParamObject', { |
20 | 20 | requires: [ |
21 | 21 | 'amdaPlotObj.PlotObjectConfig', |
22 | 22 | 'amdaPlotObj.PlotSerieObject', |
23 | + 'amdaPlotObj.PlotOrbitSerieObject', | |
23 | 24 | 'amdaPlotObj.PlotSpectroObject', |
24 | 25 | 'amdaPlotObj.PlotStatusBarObject', |
25 | 26 | 'amdaPlotObj.PlotTickBarObject', |
... | ... | @@ -69,6 +70,8 @@ Ext.define('amdaPlotObj.PlotParamObject', { |
69 | 70 | { |
70 | 71 | case 'serie' : |
71 | 72 | return new amdaPlotObj.PlotSerieObject(data); |
73 | + case 'orbit-serie' : | |
74 | + return new amdaPlotObj.PlotOrbitSerieObject(data); | |
72 | 75 | case 'spectro' : |
73 | 76 | return new amdaPlotObj.PlotSpectroObject(data); |
74 | 77 | case 'status-bar' : |
... | ... | @@ -145,7 +148,13 @@ Ext.define('amdaPlotObj.PlotParamObject', { |
145 | 148 | switch (plotType) |
146 | 149 | { |
147 | 150 | case 'xyPlot' : |
148 | - info = this.get('param-id')+' = f('+this.get('param-drawing-object').get('serie-xaxis-param')+', t)'; | |
151 | + if (this.get('param-drawing-type') == 'orbit-serie') | |
152 | + { | |
153 | + var projection = amdaPlotObj.PlotObjectConfig.getValueByKey(amdaPlotObj.PlotObjectConfig.availableOrbitSerieProjections, this.get('param-drawing-object').get('serie-projection')); | |
154 | + info = this.get('param-id')+', '+projection; | |
155 | + } | |
156 | + else | |
157 | + info = this.get('param-id')+' = f('+this.get('param-drawing-object').get('serie-xaxis-param')+', t)'; | |
149 | 158 | break; |
150 | 159 | case 'instantPlot' : |
151 | 160 | info = this.get('param-id'); | ... | ... |
js/app/models/PlotObjects/PlotRequestObject.js
... | ... | @@ -28,6 +28,7 @@ Ext.define('amdaPlotObj.PlotRequestObject', { |
28 | 28 | {name: 'file-output', type: 'string'}, |
29 | 29 | {name: 'file-prefix', type: 'string'}, |
30 | 30 | {name: 'one-file-per-interval', type: 'boolean'}, |
31 | + {name: 'last-plotted-tab', type: 'int', defaultValue: 0}, | |
31 | 32 | {name: 'last-tab-id', type: 'int', defaultValue: 0} |
32 | 33 | ], |
33 | 34 | |
... | ... | @@ -65,6 +66,7 @@ Ext.define('amdaPlotObj.PlotRequestObject', { |
65 | 66 | this.set('file-output', amdaPlotObj.PlotObjectConfig.defaultValues.file.output); |
66 | 67 | this.set('file-prefix', ''); |
67 | 68 | this.set('one-file-per-interval', amdaPlotObj.PlotObjectConfig.defaultValues.file.oneFilePerInterval); |
69 | + this.set('last-plotted-tab', 0); | |
68 | 70 | this.set('name', ''); |
69 | 71 | }, |
70 | 72 | |
... | ... | @@ -118,6 +120,7 @@ Ext.define('amdaPlotObj.PlotRequestObject', { |
118 | 120 | requestValues['file-output'] = this.get('file-output'); |
119 | 121 | requestValues['file-prefix'] = this.get('file-prefix'); |
120 | 122 | requestValues['one-file-per-interval'] = this.get('one-file-per-interval'); |
123 | + requestValues['last-plotted-tab'] = this.get('last-plotted-tab'); | |
121 | 124 | requestValues['name'] = this.get('name'); |
122 | 125 | |
123 | 126 | requestValues['timesrc'] = this.get('timesrc'); | ... | ... |
js/app/models/PlotObjects/PlotSerieObject.js
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 | * Projectย : AMDA-NG |
3 | 3 | * Name : PlotSerieObject.js |
4 | 4 | * @class amdaPlotObj.PlotSerieObject |
5 | - * @extends Ext.data.Model | |
5 | + * @extends amdaPlotObj.PlotBaseSerieObject | |
6 | 6 | * @brief Plot Serie Business Object Definition |
7 | 7 | * @author Benjamin Renard |
8 | 8 | * @version $Id: PlotSerieObject.js benjamin $ |
... | ... | @@ -14,137 +14,62 @@ |
14 | 14 | |
15 | 15 | |
16 | 16 | Ext.define('amdaPlotObj.PlotSerieObject', { |
17 | - extend: 'Ext.data.Model', | |
18 | - | |
19 | - requires: [ | |
20 | - 'amdaPlotObj.PlotObjectConfig' | |
21 | - ], | |
17 | + extend: 'amdaPlotObj.PlotBaseSerieObject', | |
22 | 18 | |
23 | 19 | fields : [ |
24 | - {name: 'serie-yaxis', type: 'string'}, | |
25 | - {name: 'serie-lines-activated', type: 'boolean'}, | |
26 | - {name: 'serie-lines-style', type: 'string'}, | |
27 | - {name: 'serie-lines-width', type: 'float'}, | |
28 | - {name: 'serie-lines-color', type: 'string'}, | |
29 | - {name: 'serie-symbols-activated', type: 'boolean'}, | |
30 | - {name: 'serie-symbols-type', type: 'string'}, | |
31 | - {name: 'serie-symbols-size', type: 'float'}, | |
32 | - {name: 'serie-symbols-color', type: 'string'}, | |
33 | - {name: 'serie-colored-param', type: 'string'}, | |
34 | - | |
35 | 20 | //Only used for xyPlot |
36 | 21 | {name: 'serie-xaxis-param', type: 'string'}, |
37 | 22 | {name: 'serie-resampling-mode', type: 'string'}, |
38 | - //Time tick | |
39 | - {name: 'serie-timetick-activated', type: 'boolean'}, | |
40 | - {name: 'serie-timetick-type', type: 'string'}, | |
41 | - {name: 'serie-timetick-step', type: 'float'}, | |
42 | - {name: 'serie-timetick-nbmajor', type: 'int'}, | |
43 | - {name: 'serie-timetick-nbminor', type: 'int'}, | |
44 | - {name: 'serie-timetick-color', type: 'string'}, | |
45 | - {name: 'serie-timetick-symbols-type', type: 'string'}, | |
46 | - {name: 'serie-timetick-symbols-size', type: 'float'}, | |
47 | - {name: 'serie-timetick-symbols-color', type: 'string'}, | |
48 | - {name: 'serie-timetick-firstsymbols-activated', type: 'boolean'}, | |
49 | - {name: 'serie-timetick-firstsymbols-type', type: 'string'}, | |
50 | - {name: 'serie-timetick-firstsymbols-size', type: 'float'}, | |
51 | - {name: 'serie-timetick-firstsymbols-color', type: 'string'}, | |
52 | - {name: 'serie-timetick-font-activated', type: 'boolean'}, | |
53 | - {name: 'serie-timetick-font-name', type: 'string'}, | |
54 | - {name: 'serie-timetick-font-size', type: 'int'}, | |
55 | - {name: 'serie-timetick-font-bold', type: 'boolean'}, | |
56 | - {name: 'serie-timetick-font-italic', type: 'boolean'} | |
23 | + | |
24 | + //Only used for timePlot | |
25 | + {name: 'serie-errorbar-activated', type: 'boolean'}, | |
26 | + {name: 'serie-errorbar-type', type: 'string'}, | |
27 | + {name: 'serie-errorbar-lines-style', type: 'string'}, | |
28 | + {name: 'serie-errorbar-lines-width', type: 'float'}, | |
29 | + {name: 'serie-errorbar-lines-color', type: 'string'}, | |
30 | + {name: 'serie-errorbar-minparam', type: 'string'}, | |
31 | + {name: 'serie-errorbar-maxparam', type: 'string'}, | |
32 | + {name: 'serie-errorbar-deltaparam', type: 'string'} | |
57 | 33 | ], |
58 | 34 | |
59 | 35 | constructor: function(){ |
60 | 36 | var me = this; |
61 | 37 | me.callParent(arguments); |
62 | - if ((arguments.length > 0) && arguments[0]) | |
63 | - { | |
64 | - } | |
65 | - else | |
66 | - { | |
67 | - //new object, set default fields values | |
68 | - me.setDefaultValues(); | |
69 | - } | |
70 | - this.dirty = false; | |
71 | 38 | }, |
72 | 39 | |
73 | 40 | setDefaultValues: function() |
74 | 41 | { |
75 | - this.set('serie-yaxis', amdaPlotObj.PlotObjectConfig.defaultValues.serie.yAxis); | |
76 | - this.set('serie-lines-activated', true); | |
77 | - this.set('serie-lines-style', amdaPlotObj.PlotObjectConfig.defaultValues.serie.lines.style); | |
78 | - this.set('serie-lines-width', amdaPlotObj.PlotObjectConfig.defaultValues.serie.lines.width); | |
79 | - this.set('serie-lines-color', amdaPlotObj.PlotObjectConfig.defaultValues.serie.lines.color); | |
80 | - this.set('serie-symbols-activated', false); | |
81 | - this.set('serie-symbols-type', amdaPlotObj.PlotObjectConfig.defaultValues.serie.symbols.type); | |
82 | - this.set('serie-symbols-size', amdaPlotObj.PlotObjectConfig.defaultValues.serie.symbols.size); | |
83 | - this.set('serie-symbols-color', amdaPlotObj.PlotObjectConfig.defaultValues.serie.symbols.color); | |
84 | - this.set('serie-colored-param', ''); | |
85 | - | |
86 | - this.set('serie-timetick-activated', false); | |
87 | - this.set('serie-timetick-type', amdaPlotObj.PlotObjectConfig.defaultValues.serie.timetick.type); | |
88 | - this.set('serie-timetick-step', amdaPlotObj.PlotObjectConfig.defaultValues.serie.timetick.step); | |
89 | - this.set('serie-timetick-nbmajor', amdaPlotObj.PlotObjectConfig.defaultValues.serie.timetick.nbmajor); | |
90 | - this.set('serie-timetick-nbminor', amdaPlotObj.PlotObjectConfig.defaultValues.serie.timetick.nbminor); | |
91 | - this.set('serie-timetick-color', amdaPlotObj.PlotObjectConfig.defaultValues.serie.timetick.color); | |
92 | - this.set('serie-timetick-symbols-type', amdaPlotObj.PlotObjectConfig.defaultValues.serie.timetick.symbols.type); | |
93 | - this.set('serie-timetick-symbols-size', amdaPlotObj.PlotObjectConfig.defaultValues.serie.timetick.symbols.size); | |
94 | - this.set('serie-timetick-symbols-color', amdaPlotObj.PlotObjectConfig.defaultValues.serie.timetick.symbols.color); | |
95 | - this.set('serie-timetick-firstsymbols-activated', true); | |
96 | - this.set('serie-timetick-firstsymbols-type', amdaPlotObj.PlotObjectConfig.defaultValues.serie.timetick.firstsymbols.type); | |
97 | - this.set('serie-timetick-firstsymbols-size', amdaPlotObj.PlotObjectConfig.defaultValues.serie.timetick.firstsymbols.size); | |
98 | - this.set('serie-timetick-firstsymbols-color', amdaPlotObj.PlotObjectConfig.defaultValues.serie.timetick.firstsymbols.color); | |
99 | - this.set('serie-timetick-font-activated', false); | |
100 | - this.set('serie-timetick-font-name', amdaPlotObj.PlotObjectConfig.defaultValues.serie.timetick.font.name); | |
101 | - this.set('serie-timetick-font-size', amdaPlotObj.PlotObjectConfig.defaultValues.serie.timetick.font.size); | |
102 | - this.set('serie-timetick-font-bold', false); | |
103 | - this.set('serie-timetick-font-italic', false); | |
42 | + this.set('serie-errorbar-activated', false); | |
43 | + this.set('serie-errorbar-type', amdaPlotObj.PlotObjectConfig.defaultValues.serie.errorbar.type); | |
44 | + this.set('serie-errorbar-lines-style', amdaPlotObj.PlotObjectConfig.defaultValues.serie.errorbar.lines.style); | |
45 | + this.set('serie-errorbar-lines-width', amdaPlotObj.PlotObjectConfig.defaultValues.serie.errorbar.lines.width); | |
46 | + this.set('serie-errorbar-lines-color', amdaPlotObj.PlotObjectConfig.defaultValues.serie.errorbar.lines.color); | |
47 | + this.set('serie-errorbar-minparam', ''); | |
48 | + this.set('serie-errorbar-maxparam', ''); | |
49 | + this.set('serie-errorbar-deltaparam', ''); | |
104 | 50 | |
105 | 51 | this.set('serie-xaxis-param', ''); |
106 | 52 | this.set('serie-resampling-mode', amdaPlotObj.PlotObjectConfig.defaultValues.serie.resamplingMode); |
53 | + | |
54 | + this.callParent(arguments); | |
107 | 55 | }, |
108 | 56 | |
109 | 57 | getJsonValues : function() |
110 | 58 | { |
111 | - var serieValues = new Object(); | |
59 | + var serieValues = this.callParent(arguments); | |
112 | 60 | |
113 | - serieValues['serie-yaxis'] = this.get('serie-yaxis'); | |
114 | - serieValues['serie-lines-activated'] = this.get('serie-lines-activated'); | |
115 | - serieValues['serie-lines-style'] = this.get('serie-lines-style'); | |
116 | - serieValues['serie-lines-width'] = this.get('serie-lines-width'); | |
117 | - serieValues['serie-lines-color'] = this.get('serie-lines-color'); | |
118 | - serieValues['serie-symbols-activated'] = this.get('serie-symbols-activated'); | |
119 | - serieValues['serie-symbols-type'] = this.get('serie-symbols-type'); | |
120 | - serieValues['serie-symbols-size'] = this.get('serie-symbols-size'); | |
121 | - serieValues['serie-symbols-color'] = this.get('serie-symbols-color'); | |
122 | - serieValues['serie-colored-param'] = this.get('serie-colored-param'); | |
123 | 61 | serieValues['serie-xaxis-param'] = this.get('serie-xaxis-param'); |
124 | 62 | serieValues['serie-resampling-mode'] = this.get('serie-resampling-mode'); |
125 | 63 | |
126 | - if (this.get('serie-timetick-activated')) | |
127 | - { | |
128 | - serieValues['serie-timetick'] = new Object(); | |
129 | - serieValues['serie-timetick']['serie-timetick-type'] = this.get('serie-timetick-type'); | |
130 | - serieValues['serie-timetick']['serie-timetick-step'] = this.get('serie-timetick-step'); | |
131 | - serieValues['serie-timetick']['serie-timetick-nbmajor'] = this.get('serie-timetick-nbmajor'); | |
132 | - serieValues['serie-timetick']['serie-timetick-nbminor'] = this.get('serie-timetick-nbminor'); | |
133 | - serieValues['serie-timetick']['serie-timetick-color'] = this.get('serie-timetick-color'); | |
134 | - serieValues['serie-timetick']['serie-timetick-symbols-type'] = this.get('serie-timetick-symbols-type'); | |
135 | - serieValues['serie-timetick']['serie-timetick-symbols-size'] = this.get('serie-timetick-symbols-size'); | |
136 | - serieValues['serie-timetick']['serie-timetick-symbols-color'] = this.get('serie-timetick-symbols-color'); | |
137 | - serieValues['serie-timetick']['serie-timetick-firstsymbols-activated'] = this.get('serie-timetick-firstsymbols-activated'); | |
138 | - serieValues['serie-timetick']['serie-timetick-firstsymbols-type'] = this.get('serie-timetick-firstsymbols-type'); | |
139 | - serieValues['serie-timetick']['serie-timetick-firstsymbols-size'] = this.get('serie-timetick-firstsymbols-size'); | |
140 | - serieValues['serie-timetick']['serie-timetick-firstsymbols-color'] = this.get('serie-timetick-firstsymbols-color'); | |
141 | - serieValues['serie-timetick']['serie-timetick-font-activated'] = this.get('serie-timetick-font-activated'); | |
142 | - serieValues['serie-timetick']['serie-timetick-font-name'] = this.get('serie-timetick-font-name'); | |
143 | - serieValues['serie-timetick']['serie-timetick-font-size'] = this.get('serie-timetick-font-size'); | |
144 | - serieValues['serie-timetick']['serie-timetick-font-bold'] = this.get('serie-timetick-font-bold'); | |
145 | - serieValues['serie-timetick']['serie-timetick-font-italic'] = this.get('serie-timetick-font-italic'); | |
146 | - } | |
147 | - | |
64 | + serieValues['serie-errorbar-activated'] = this.get('serie-errorbar-activated'); | |
65 | + serieValues['serie-errorbar-type'] = this.get('serie-errorbar-type'); | |
66 | + serieValues['serie-errorbar-lines-style'] = this.get('serie-errorbar-lines-style'); | |
67 | + serieValues['serie-errorbar-lines-width'] = this.get('serie-errorbar-lines-width'); | |
68 | + serieValues['serie-errorbar-lines-color'] = this.get('serie-errorbar-lines-color'); | |
69 | + serieValues['serie-errorbar-minparam'] = this.get('serie-errorbar-minparam'); | |
70 | + serieValues['serie-errorbar-maxparam'] = this.get('serie-errorbar-maxparam'); | |
71 | + serieValues['serie-errorbar-deltaparam'] = this.get('serie-errorbar-deltaparam'); | |
72 | + | |
148 | 73 | return serieValues; |
149 | 74 | } |
150 | 75 | }); |
151 | 76 | \ No newline at end of file | ... | ... |
... | ... | @@ -0,0 +1,93 @@ |
1 | +/** | |
2 | + * Projectย : AMDA-NG | |
3 | + * Name : PlotBaseSerieForm.js | |
4 | + * @class amdaPlotComp.PlotBaseSerieForm | |
5 | + * @extends amdaPlotComp.PlotStandardForm | |
6 | + * @brief Form to define specifics base serie options | |
7 | + * @author Benjamin Renard | |
8 | + * @version $Id: PlotBaseSerieForm.js benjamin $ | |
9 | + */ | |
10 | + | |
11 | +Ext.define('amdaPlotComp.PlotBaseSerieForm', { | |
12 | + extend: 'amdaPlotComp.PlotStandardForm', | |
13 | + | |
14 | + setObject : function(object) { | |
15 | + this.object = object.get('param-drawing-object'); | |
16 | + this.loadRecord(this.object); | |
17 | + this.updateOptions(this.crtTree.getSelectedPlotType()); | |
18 | + }, | |
19 | + | |
20 | + updateOptions: function(plotType) { | |
21 | + var isScatter = (plotType == 'xyPlot'); | |
22 | + | |
23 | + var timeTickTypeField = this.getForm().findField('serie-timetick-type'); | |
24 | + var timeTickFieldSet = timeTickTypeField.findParentByType('fieldset'); | |
25 | + | |
26 | + timeTickFieldSet.setVisible(isScatter); | |
27 | + | |
28 | + if (isScatter) | |
29 | + { | |
30 | + //Update Time Tick field | |
31 | + var timeTickStepField = this.getForm().findField('serie-timetick-step'); | |
32 | + var timeTickNbMajorField = this.getForm().findField('serie-timetick-nbmajor'); | |
33 | + switch (timeTickTypeField.getValue()) | |
34 | + { | |
35 | + case 'time-step' : | |
36 | + timeTickStepField.setVisible(true); | |
37 | + timeTickNbMajorField.setVisible(false); | |
38 | + break; | |
39 | + case 'nb-major' : | |
40 | + timeTickStepField.setVisible(false); | |
41 | + timeTickNbMajorField.setVisible(true); | |
42 | + break; | |
43 | + case 'auto' : | |
44 | + default : | |
45 | + timeTickStepField.setVisible(false); | |
46 | + timeTickNbMajorField.setVisible(false); | |
47 | + } | |
48 | + } | |
49 | + }, | |
50 | + | |
51 | + getTimeTickItems: function() { | |
52 | + var me = this; | |
53 | + return [ | |
54 | + this.addStandardCombo('serie-timetick-type', 'Type', amdaPlotObj.PlotObjectConfig.availableTimeTickTypes, function(name, value, oldValue) { | |
55 | + me.updateOptions(me.crtTree.getSelectedPlotType()); | |
56 | + }), | |
57 | + this.addStandardFloat('serie-timetick-step', 'Time step (sec.)'), | |
58 | + this.addStandardFloat('serie-timetick-nbmajor', 'Number of major ticks'), | |
59 | + this.addStandardFloat('serie-timetick-nbminor', 'Number of minor ticks'), | |
60 | + this.addStandardColor('serie-timetick-color', 'Color', amdaPlotObj.PlotObjectConfig.availableColors), | |
61 | + this.addStandardFieldSet('Symbols', '', this.addStandardSymbolsItems('serie-timetick-symbols')), | |
62 | + this.addStandardFieldSet('First symbol', 'serie-timetick-firstsymbols-activated', this.addStandardSymbolsItems('serie-timetick-firstsymbols')), | |
63 | + this.addStandardFont('serie-timetick-font') | |
64 | + ]; | |
65 | + }, | |
66 | + | |
67 | + getIntervalTickItems: function() { | |
68 | + var me = this; | |
69 | + | |
70 | + return [ | |
71 | + this.addStandardCombo('serie-intervaltick-mode', 'Mode', amdaPlotObj.PlotObjectConfig.availableIntervalTickModes), | |
72 | + this.addStandardColor('serie-intervaltick-color', 'Color', amdaPlotObj.PlotObjectConfig.availableColors), | |
73 | + this.addStandardFieldSet('Symbols', '', this.addStandardSymbolsItems('serie-intervaltick-symbols')), | |
74 | + this.addStandardFont('serie-intervaltick-font') | |
75 | + ]; | |
76 | + }, | |
77 | + | |
78 | + getFormItems: function() { | |
79 | + var me = this; | |
80 | + | |
81 | + return [ | |
82 | + this.addStandardCombo('serie-yaxis', 'Y axis', amdaPlotObj.PlotObjectConfig.availableYAxes, function(name, value, oldValue) { | |
83 | + me.object.set('serie-yaxis', value); | |
84 | + me.crtTree.refresh(); | |
85 | + }), | |
86 | + this.addStandardParamDropTarget('serie-colored-param', 'Colored Parameter'), | |
87 | + this.addStandardFieldSet('Lines', 'serie-lines-activated', this.addStandardLineItems('serie-lines')), | |
88 | + this.addStandardFieldSet('Symbols', 'serie-symbols-activated', this.addStandardSymbolsItems('serie-symbols')), | |
89 | + this.addStandardFieldSet('Time ticks', 'serie-timetick-activated', this.getTimeTickItems()), | |
90 | + this.addStandardFieldSet('Interval ticks', 'serie-intervaltick-activated', this.getIntervalTickItems()) | |
91 | + ]; | |
92 | + } | |
93 | +}); | |
0 | 94 | \ No newline at end of file | ... | ... |
js/app/views/PlotComponents/PlotConstantForm.js
... | ... | @@ -33,7 +33,8 @@ Ext.define('amdaPlotComp.PlotConstantForm', { |
33 | 33 | if (me.object.get('constant-axis-id') != value) |
34 | 34 | { |
35 | 35 | me.updateOptions(value, me.crtTree.getSelectedPlotType()); |
36 | - me.crtTree.getView().refresh(); | |
36 | + me.object.set('constant-axis-id', value); | |
37 | + me.crtTree.refresh(); | |
37 | 38 | } |
38 | 39 | }), |
39 | 40 | this.addStandardDate('constant-time-value', 'Value'), | ... | ... |
js/app/views/PlotComponents/PlotFillForm.js
... | ... | @@ -81,7 +81,8 @@ Ext.define('amdaPlotComp.PlotFillForm', { |
81 | 81 | if (me.object.get('fill-type') != value) |
82 | 82 | { |
83 | 83 | me.updateOptions(); |
84 | - me.crtTree.getView().refresh(); | |
84 | + me.object.set('fill-type', value); | |
85 | + me.crtTree.refresh(); | |
85 | 86 | } |
86 | 87 | }), |
87 | 88 | this.addStandardCombo('fill-firstserie-id', 'First serie Id', []), | ... | ... |
js/app/views/PlotComponents/PlotLayoutForm.js
... | ... | @@ -92,7 +92,8 @@ Ext.define('amdaPlotComp.PlotLayoutForm', { |
92 | 92 | if (me.object.get('page-layout-type') != value) |
93 | 93 | { |
94 | 94 | me.updateLayoutOptions(); |
95 | - me.crtTree.getView().refresh(); | |
95 | + me.object.set('page-layout-type', value); | |
96 | + me.crtTree.refresh(); | |
96 | 97 | } |
97 | 98 | }), |
98 | 99 | this.layoutOptionsContainer | ... | ... |
js/app/views/PlotComponents/PlotLegendSeriesForm.js
... | ... | @@ -44,7 +44,8 @@ Ext.define('amdaPlotComp.PlotLegendSeriesForm', { |
44 | 44 | |
45 | 45 | return [ |
46 | 46 | this.addStandardFieldSet('Activate legend', 'legend-series-activated', legendItems, function(name, value, oldValue) { |
47 | - me.crtTree.getView().refresh(); | |
47 | + me.object.set('legend-series-activated', value); | |
48 | + me.crtTree.refresh(); | |
48 | 49 | }) |
49 | 50 | ]; |
50 | 51 | } | ... | ... |
js/app/views/PlotComponents/PlotLegendTextForm.js
... | ... | @@ -24,7 +24,8 @@ Ext.define('amdaPlotComp.PlotLegendTextForm', { |
24 | 24 | this.addStandardText('legend-text-value', 'Text'), |
25 | 25 | this.addStandardColor('legend-text-color', 'Color', amdaPlotObj.PlotObjectConfig.availableColors), |
26 | 26 | this.addStandardCombo('legend-text-position', 'Position', amdaPlotObj.PlotObjectConfig.availableLegendTextPositions, function(name, value, oldValue) { |
27 | - me.crtTree.getView().refresh(); | |
27 | + me.object.set('legend-text-position', value); | |
28 | + me.crtTree.refresh(); | |
28 | 29 | }), |
29 | 30 | this.addStandardFont('legend-text-font') |
30 | 31 | ]; | ... | ... |
... | ... | @@ -0,0 +1,32 @@ |
1 | +/** | |
2 | + * Projectย : AMDA-NG | |
3 | + * Name : PlotOrbitSerieForm.js | |
4 | + * @class amdaPlotComp.PlotOrbitSerieForm | |
5 | + * @extends amdaPlotComp.PlotBaseSerieForm | |
6 | + * @brief Form to define specifics orbit serie options | |
7 | + * @author Benjamin Renard | |
8 | + * @version $Id: PlotOrbitSerieForm.js benjamin $ | |
9 | + */ | |
10 | + | |
11 | +Ext.define('amdaPlotComp.PlotOrbitSerieForm', { | |
12 | + extend: 'amdaPlotComp.PlotBaseSerieForm', | |
13 | + | |
14 | + getFormItems: function() { | |
15 | + var me = this; | |
16 | + | |
17 | + var baseSerieItems = this.callParent(arguments); | |
18 | + | |
19 | + var orbitSerieItems = [ | |
20 | + this.addStandardCombo('serie-projection', 'Projection', amdaPlotObj.PlotObjectConfig.availableOrbitSerieProjections, function(name, value, oldValue) { | |
21 | + me.object.set('serie-projection', value); | |
22 | + me.crtTree.refresh(); | |
23 | + }), | |
24 | + ]; | |
25 | + | |
26 | + Ext.each(baseSerieItems, function(item) { | |
27 | + orbitSerieItems.push(item); | |
28 | + }); | |
29 | + | |
30 | + return orbitSerieItems; | |
31 | + } | |
32 | +}); | |
0 | 33 | \ No newline at end of file | ... | ... |
js/app/views/PlotComponents/PlotPageForm.js
... | ... | @@ -29,13 +29,16 @@ Ext.define('amdaPlotComp.PlotPageForm', { |
29 | 29 | return [ |
30 | 30 | //this.addStandardCombo('page-mode', 'Mode', amdaPlotObj.PlotObjectConfig.availablePageModes), |
31 | 31 | this.addStandardCombo('page-orientation', 'Orientation', amdaPlotObj.PlotObjectConfig.availablePageOrientations, function(name, value, oldValue) { |
32 | - me.crtTree.getView().refresh(); | |
32 | + me.object.set('page-orientation', value); | |
33 | + me.crtTree.refresh(); | |
33 | 34 | }), |
34 | 35 | this.addStandardCombo('page-dimension', 'Dimension', amdaPlotObj.PlotObjectConfig.availablePageDimensions, function(name, value, oldValue) { |
35 | - me.crtTree.getView().refresh(); | |
36 | + me.object.set('page-dimension', value); | |
37 | + me.crtTree.refresh(); | |
36 | 38 | }), |
37 | 39 | this.addStandardCheck('page-superpose-mode', 'Epoch Superposed Mode', function(name, value, oldValue) { |
38 | - me.crtTree.getView().refresh(); | |
40 | + me.object.set('page-superpose-mode', value); | |
41 | + me.crtTree.refresh(); | |
39 | 42 | }), |
40 | 43 | this.addStandardFieldSet('Title', '', titleItems), |
41 | 44 | this.addStandardFieldSet('Margins', 'page-margins-activated', marginItems), | ... | ... |
js/app/views/PlotComponents/PlotPanelForm.js
... | ... | @@ -125,18 +125,22 @@ Ext.define('amdaPlotComp.PlotPanelForm', { |
125 | 125 | me.crtTree.buildPanelAxesNode(me.object); |
126 | 126 | me.crtTree.buildPanelAdditionalObjectsNode(me.object); |
127 | 127 | } |
128 | - me.crtTree.getView().refresh(); | |
128 | + me.object.set('panel-plot-type', value); | |
129 | + me.crtTree.refresh(); | |
129 | 130 | me.updateOptions(value); |
130 | 131 | } |
131 | 132 | }), |
132 | 133 | this.addStandardCheck('panel-scatter-isotropic', 'Isotropic', function(name, value, oldValue) { |
133 | - me.crtTree.getView().refresh(); | |
134 | + me.object.set('panel-scatter-isotropic', value); | |
135 | + me.crtTree.refresh(); | |
134 | 136 | }), |
135 | 137 | this.addStandardText('panel-epoch-centertimeid', 'Epoch Center Time Id', function(name, value, oldValue) { |
136 | - me.crtTree.getView().refresh(); | |
138 | + me.object.set('panel-epoch-centertimeid', value); | |
139 | + me.crtTree.refresh(); | |
137 | 140 | }), |
138 | 141 | this.addStandardDate('panel-instant-time', 'Instant time', function(name, value, oldValue) { |
139 | - me.crtTree.getView().refresh(); | |
142 | + me.object.set('panel-instant-time', value); | |
143 | + me.crtTree.refresh(); | |
140 | 144 | }), |
141 | 145 | this.addStandardColor('panel-background-color', 'Background Color', amdaPlotObj.PlotObjectConfig.availableBackgroundColors), |
142 | 146 | this.addStandardFieldSet('Manual Bounds', '', boundsItems), | ... | ... |
js/app/views/PlotComponents/PlotParamForm.js
... | ... | @@ -13,6 +13,7 @@ Ext.define('amdaPlotComp.PlotParamForm', { |
13 | 13 | |
14 | 14 | requires: [ |
15 | 15 | 'amdaPlotComp.PlotSerieForm', |
16 | + 'amdaPlotComp.PlotOrbitSerieForm', | |
16 | 17 | 'amdaPlotComp.PlotSpectroForm', |
17 | 18 | 'amdaPlotComp.PlotStatusBarForm', |
18 | 19 | 'amdaPlotComp.PlotTickBarForm', |
... | ... | @@ -54,6 +55,9 @@ Ext.define('amdaPlotComp.PlotParamForm', { |
54 | 55 | case 'serie' : |
55 | 56 | this.drawingOptionsFormsManager.register(new amdaPlotComp.PlotSerieForm({id : formId})); |
56 | 57 | break; |
58 | + case 'orbit-serie' : | |
59 | + this.drawingOptionsFormsManager.register(new amdaPlotComp.PlotOrbitSerieForm({id : formId})); | |
60 | + break; | |
57 | 61 | case 'spectro' : |
58 | 62 | this.drawingOptionsFormsManager.register(new amdaPlotComp.PlotSpectroForm({id : formId})); |
59 | 63 | break; |
... | ... | @@ -108,7 +112,8 @@ Ext.define('amdaPlotComp.PlotParamForm', { |
108 | 112 | if (me.object.get('param-drawing-type') != value) |
109 | 113 | { |
110 | 114 | me.object.changeDrawingType(value); |
111 | - me.crtTree.getView().refresh(); | |
115 | + me.object.set('param-drawing-type', value); | |
116 | + me.crtTree.refresh(); | |
112 | 117 | me.updateDrawingOptions(value); |
113 | 118 | } |
114 | 119 | }), | ... | ... |
js/app/views/PlotComponents/PlotSerieForm.js
... | ... | @@ -2,87 +2,76 @@ |
2 | 2 | * Projectย : AMDA-NG |
3 | 3 | * Name : PlotSerieForm.js |
4 | 4 | * @class amdaPlotComp.PlotSerieForm |
5 | - * @extends amdaPlotComp.PlotStandardForm | |
5 | + * @extends amdaPlotComp.PlotBaseSerieForm | |
6 | 6 | * @brief Form to define specifics serie options |
7 | 7 | * @author Benjamin Renard |
8 | 8 | * @version $Id: PlotSerieForm.js benjamin $ |
9 | 9 | */ |
10 | 10 | |
11 | 11 | Ext.define('amdaPlotComp.PlotSerieForm', { |
12 | - extend: 'amdaPlotComp.PlotStandardForm', | |
13 | - | |
14 | - setObject : function(object) { | |
15 | - this.object = object.get('param-drawing-object'); | |
16 | - this.loadRecord(this.object); | |
17 | - this.updateOptions(this.crtTree.getSelectedPlotType()); | |
18 | - }, | |
12 | + extend: 'amdaPlotComp.PlotBaseSerieForm', | |
19 | 13 | |
20 | 14 | updateOptions: function(plotType) { |
21 | 15 | var isScatter = (plotType == 'xyPlot'); |
22 | 16 | |
23 | 17 | var xParamField = this.getForm().findField('serie-xaxis-param'); |
24 | 18 | var resamplingModeField = this.getForm().findField('serie-resampling-mode'); |
25 | - var timeTickTypeField = this.getForm().findField('serie-timetick-type'); | |
26 | - var timeTickFieldSet = timeTickTypeField.findParentByType('fieldset'); | |
27 | 19 | |
28 | 20 | xParamField.setVisible(isScatter); |
29 | 21 | resamplingModeField.setVisible(isScatter); |
30 | - timeTickFieldSet.setVisible(isScatter); | |
31 | 22 | |
32 | - if (isScatter) | |
23 | + var errorBarTypeField = this.getForm().findField('serie-errorbar-type'); | |
24 | + var errorBarFieldSet = errorBarTypeField.findParentByType('fieldset'); | |
25 | + | |
26 | + errorBarFieldSet.setVisible(!isScatter); | |
27 | + | |
28 | + if (!isScatter) | |
33 | 29 | { |
34 | - //Update Time Tick field | |
35 | - var timeTickStepField = this.getForm().findField('serie-timetick-step'); | |
36 | - var timeTickNbMajorField = this.getForm().findField('serie-timetick-nbmajor'); | |
37 | - switch (timeTickTypeField.getValue()) | |
38 | - { | |
39 | - case 'time-step' : | |
40 | - timeTickStepField.setVisible(true); | |
41 | - timeTickNbMajorField.setVisible(false); | |
42 | - break; | |
43 | - case 'nb-major' : | |
44 | - timeTickStepField.setVisible(false); | |
45 | - timeTickNbMajorField.setVisible(true); | |
46 | - break; | |
47 | - case 'auto' : | |
48 | - default : | |
49 | - timeTickStepField.setVisible(false); | |
50 | - timeTickNbMajorField.setVisible(false); | |
51 | - } | |
30 | + var errorMinField = this.getForm().findField('serie-errorbar-minparam'); | |
31 | + var errorMaxField = this.getForm().findField('serie-errorbar-maxparam'); | |
32 | + var errorDeltaField = this.getForm().findField('serie-errorbar-deltaparam'); | |
33 | + | |
34 | + errorMinField.setVisible(errorBarTypeField.getValue() == 'min-max'); | |
35 | + errorMaxField.setVisible(errorBarTypeField.getValue() == 'min-max'); | |
36 | + errorDeltaField.setVisible(errorBarTypeField.getValue() == 'delta'); | |
52 | 37 | } |
38 | + | |
39 | + this.callParent(arguments); | |
53 | 40 | }, |
54 | 41 | |
55 | - getTimeTickItems: function() { | |
42 | + getErrorBarItems: function() { | |
56 | 43 | var me = this; |
44 | + | |
57 | 45 | return [ |
58 | - this.addStandardCombo('serie-timetick-type', 'Type', amdaPlotObj.PlotObjectConfig.availableTimeTickTypes, function(name, value, oldValue) { | |
59 | - me.updateOptions(me.crtTree.getSelectedPlotType()); | |
46 | + this.addStandardCombo('serie-errorbar-type', 'Type', amdaPlotObj.PlotObjectConfig.availableErrorBarTypes, function(name, value, oldValue) { | |
47 | + me.updateOptions(me.crtTree.getSelectedPlotType()); | |
60 | 48 | }), |
61 | - this.addStandardFloat('serie-timetick-step', 'Time step (sec.)'), | |
62 | - this.addStandardFloat('serie-timetick-nbmajor', 'Number of major ticks'), | |
63 | - this.addStandardFloat('serie-timetick-nbminor', 'Number of minor ticks'), | |
64 | - this.addStandardColor('serie-timetick-color', 'Color', amdaPlotObj.PlotObjectConfig.availableColors), | |
65 | - this.addStandardFieldSet('Symbols', '', this.addStandardSymbolsItems('serie-timetick-symbols')), | |
66 | - this.addStandardFieldSet('First symbol', 'serie-timetick-firstsymbols-activated', this.addStandardSymbolsItems('serie-timetick-firstsymbols')), | |
67 | - this.addStandardFont('serie-timetick-font') | |
49 | + this.addStandardParamDropTarget('serie-errorbar-minparam', 'Min. Parameter'), | |
50 | + this.addStandardParamDropTarget('serie-errorbar-maxparam', 'Max. Parameter'), | |
51 | + this.addStandardParamDropTarget('serie-errorbar-deltaparam', 'Delta Parameter'), | |
52 | + this.addStandardFieldSet('Bar Lines', '', this.addStandardLineItems('serie-errorbar-lines')) | |
68 | 53 | ]; |
69 | 54 | }, |
70 | 55 | |
71 | 56 | getFormItems: function() { |
72 | 57 | var me = this; |
73 | 58 | |
74 | - return [ | |
75 | - this.addStandardParamDropTarget('serie-xaxis-param', 'X Parameter', function(name, value, oldValue) { | |
76 | - me.crtTree.getView().refresh(); | |
77 | - }), | |
78 | - this.addStandardCombo('serie-resampling-mode', 'Reference parameter for resampling', amdaPlotObj.PlotObjectConfig.availableResamplingModes), | |
79 | - this.addStandardCombo('serie-yaxis', 'Y axis', amdaPlotObj.PlotObjectConfig.availableYAxes, function(name, value, oldValue) { | |
80 | - me.crtTree.getView().refresh(); | |
81 | - }), | |
82 | - this.addStandardParamDropTarget('serie-colored-param', 'Colored Parameter'), | |
83 | - this.addStandardFieldSet('Lines', 'serie-lines-activated', this.addStandardLineItems('serie-lines')), | |
84 | - this.addStandardFieldSet('Symbols', 'serie-symbols-activated', this.addStandardSymbolsItems('serie-symbols')), | |
85 | - this.addStandardFieldSet('Time ticks', 'serie-timetick-activated', this.getTimeTickItems()) | |
59 | + var baseSerieItems = this.callParent(arguments); | |
60 | + | |
61 | + var serieItems = [ | |
62 | + this.addStandardParamDropTarget('serie-xaxis-param', 'X Parameter', function(name, value, oldValue) { | |
63 | + me.object.set('serie-xaxis-param', value); | |
64 | + me.crtTree.refresh(); | |
65 | + }), | |
66 | + this.addStandardCombo('serie-resampling-mode', 'Reference parameter for resampling', amdaPlotObj.PlotObjectConfig.availableResamplingModes) | |
86 | 67 | ]; |
68 | + | |
69 | + Ext.each(baseSerieItems, function(item) { | |
70 | + serieItems.push(item); | |
71 | + }); | |
72 | + | |
73 | + serieItems.push(this.addStandardFieldSet('Error Bar', 'serie-errorbar-activated', this.getErrorBarItems())); | |
74 | + | |
75 | + return serieItems; | |
87 | 76 | } |
88 | 77 | }); |
89 | 78 | \ No newline at end of file | ... | ... |
js/app/views/PlotComponents/PlotSpectroForm.js
... | ... | @@ -20,7 +20,8 @@ Ext.define('amdaPlotComp.PlotSpectroForm', { |
20 | 20 | var me = this; |
21 | 21 | return [ |
22 | 22 | this.addStandardCombo('spectro-yaxis', 'Y axis', amdaPlotObj.PlotObjectConfig.availableYAxes, function(name, value, oldValue) { |
23 | - me.crtTree.getView().refresh(); | |
23 | + me.object.set('spectro-yaxis', value); | |
24 | + me.crtTree.refresh(); | |
24 | 25 | }) |
25 | 26 | ]; |
26 | 27 | } | ... | ... |
js/app/views/PlotComponents/PlotTabPanel.js
... | ... | @@ -109,6 +109,13 @@ Ext.define('amdaPlotComp.PlotTabPanel', { |
109 | 109 | return plotTab.child().treePlot; |
110 | 110 | }, |
111 | 111 | |
112 | + getSelectedTabId: function() | |
113 | + { | |
114 | + if (this.getActiveTab()) | |
115 | + return this.getActiveTab().child().tabId; | |
116 | + return 0; | |
117 | + }, | |
118 | + | |
112 | 119 | init : function(config) { |
113 | 120 | var me = this; |
114 | 121 | ... | ... |
js/app/views/PlotComponents/PlotTree.js
... | ... | @@ -37,6 +37,10 @@ Ext.define('amdaPlotComp.PlotTree', { |
37 | 37 | this.callParent(arguments); |
38 | 38 | }, |
39 | 39 | |
40 | + refresh: function() { | |
41 | + this.getView().refresh(); | |
42 | + }, | |
43 | + | |
40 | 44 | buildTree: function(tabObject) { |
41 | 45 | if (this.store.getRootNode().hasChildNodes()) |
42 | 46 | this.store.getRootNode().removeAll(); |
... | ... | @@ -747,7 +751,8 @@ Ext.define('amdaPlotComp.PlotTree', { |
747 | 751 | rootVisible: false, |
748 | 752 | hideHeaders: true, |
749 | 753 | viewConfig:{ |
750 | - plugins: this.getDragAndDropPluginConfig() | |
754 | + plugins: this.getDragAndDropPluginConfig(), | |
755 | + preserveScrollOnRefresh: true | |
751 | 756 | }, |
752 | 757 | listeners: { |
753 | 758 | select: me.onNodeSelect, | ... | ... |
js/app/views/PlotTabResultUI.js
... | ... | @@ -26,6 +26,10 @@ Ext.define('amdaUI.PlotTabResultUI', { |
26 | 26 | panelImage : null, |
27 | 27 | crtContext : null, |
28 | 28 | tabId : '', |
29 | + multiPlotCheck : null, | |
30 | + navToolBar : null, | |
31 | + isTTNavBar : false, | |
32 | + crtTTFileIndex : 0, | |
29 | 33 | |
30 | 34 | constructor: function(config) { |
31 | 35 | this.addEvents({'pagesize':true}); |
... | ... | @@ -266,7 +270,7 @@ Ext.define('amdaUI.PlotTabResultUI', { |
266 | 270 | if (!me.crtContext) |
267 | 271 | return; |
268 | 272 | |
269 | - me.contextualMenu.removeAll(); | |
273 | + me.contextualMenu.removeAll(true); | |
270 | 274 | |
271 | 275 | var sourceXPos = me.toPixelOnSourceImage(imageX); |
272 | 276 | var sourceYPos = me.toPixelOnSourceImage(imageY); |
... | ... | @@ -298,9 +302,21 @@ Ext.define('amdaUI.PlotTabResultUI', { |
298 | 302 | return this.panelImage; |
299 | 303 | }, |
300 | 304 | |
301 | - updatePlotImage: function(configResult) { | |
305 | + updatePlotImage: function(configResult, newPlot) { | |
302 | 306 | this.crtContext = configResult.context; |
303 | 307 | |
308 | + this.crtTTFileIndex = configResult.ttFileIndex; | |
309 | + | |
310 | + if (this.isTTNavBar != (!configResult.isInterval)) | |
311 | + { | |
312 | + //Update navigation bar | |
313 | + this.updateNavToolBar(!configResult.isInterval); | |
314 | + } | |
315 | + | |
316 | + this.updateTimeTableInfo(); | |
317 | + | |
318 | + this.multiPlotCheck.setValue(configResult.multiplot); | |
319 | + | |
304 | 320 | this.panelImage.setSrc(this.getImageUrl(configResult.folder, configResult.plotFile)); |
305 | 321 | |
306 | 322 | var size = this.getImageSize(); |
... | ... | @@ -309,6 +325,24 @@ Ext.define('amdaUI.PlotTabResultUI', { |
309 | 325 | this.panelImage.refreshMe(); |
310 | 326 | }, |
311 | 327 | |
328 | + updateTimeTableInfo: function() | |
329 | + { | |
330 | + if (!this.navToolBar) | |
331 | + return; | |
332 | + | |
333 | + var ttNameField = this.navToolBar.items.get('tt-table-'+this.tabId); | |
334 | + if (ttNameField) | |
335 | + ttNameField.setValue(this.crtContext.page.ttName); | |
336 | + | |
337 | + var ttNumberField = this.navToolBar.items.get('tt-number-'+this.tabId); | |
338 | + if (ttNumberField) | |
339 | + ttNumberField.setValue(this.crtContext.page.ttIndex + 1); | |
340 | + | |
341 | + var ttTotalField = this.navToolBar.items.get('tt-total-'+this.tabId); | |
342 | + if (ttTotalField) | |
343 | + ttTotalField.setValue(this.crtContext.page.ttNbIntervals); | |
344 | + }, | |
345 | + | |
312 | 346 | callInteractivePlot : function(obj) { |
313 | 347 | loadMask.show(true); |
314 | 348 | AmdaAction.interactivePlot(obj, function (result, e) { |
... | ... | @@ -321,7 +355,7 @@ Ext.define('amdaUI.PlotTabResultUI', { |
321 | 355 | if (result.success) |
322 | 356 | { |
323 | 357 | myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.plot.id, true, function (module) { |
324 | - module.updateInteractiveSession(result); | |
358 | + module.updateInteractiveSession(result, false); | |
325 | 359 | }); |
326 | 360 | } |
327 | 361 | else |
... | ... | @@ -338,129 +372,202 @@ Ext.define('amdaUI.PlotTabResultUI', { |
338 | 372 | },this); |
339 | 373 | }, |
340 | 374 | |
341 | - createToolBar : function(isTimeTable) { | |
342 | - var interoperItemCfg = { | |
343 | - text: 'Get HST Data', | |
344 | - scope: this, | |
345 | - menu: [ | |
346 | - { | |
347 | - text: 'Giant Planet Auroral Emissions', | |
348 | - scope: this, | |
349 | - handler: function() | |
350 | - { | |
351 | - var me = this; | |
352 | - myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.astro.id, true, function (module) { | |
353 | - //module.createWindow(me.object.get('startDate'),me.object.get('stopDate')); | |
354 | - }); | |
355 | - } | |
356 | - } | |
357 | - ] | |
358 | - }; | |
359 | - | |
360 | - if (isTimeTable) { | |
361 | - var toolConfig = { | |
362 | - dock: 'top', | |
363 | - items: [ | |
364 | - { | |
365 | - text: 'Previous', | |
366 | - scope: this, | |
367 | - handler: function(){ | |
368 | - } | |
369 | - }, | |
370 | - '-', | |
371 | - { | |
372 | - text: 'Next', | |
373 | - scope: this, | |
374 | - handler: function(){ | |
375 | - } | |
376 | - }, | |
377 | - '-', | |
378 | - { | |
379 | - text: 'Go to Interval #', | |
380 | - scope: this, | |
381 | - handler: function(bt){ | |
382 | - } | |
383 | - }, | |
384 | - { | |
385 | - xtype: 'numberfield', | |
386 | - hideTrigger: true, | |
387 | - width: 40, | |
388 | - minValue: 1 | |
389 | - }, | |
390 | - ' ', | |
391 | - ' ', | |
392 | - ' ', | |
393 | - { | |
394 | - xtype: 'textfield', | |
395 | - labelAlign: 'right', | |
396 | - labelWidth: 30, | |
397 | - fieldLabel: 'Table', | |
398 | - width: 130, | |
399 | - disabled : true | |
400 | - }, | |
401 | - { | |
402 | - xtype: 'textfield', | |
403 | - labelAlign: 'right', | |
404 | - labelWidth: 30, | |
405 | - fieldLabel: 'Int #', | |
406 | - width: 70, | |
407 | - disabled : true | |
408 | - }, | |
409 | - { | |
410 | - xtype: 'textfield', | |
411 | - labelAlign: 'right', | |
412 | - labelWidth: 30, | |
413 | - fieldLabel: 'Total', | |
414 | - width: 70, | |
415 | - disabled : true | |
416 | - }, | |
417 | - '->', | |
418 | - interoperItemCfg | |
419 | - ] | |
420 | - }; | |
375 | + updateNavToolBar : function(isTimeTable) { | |
376 | + if (this.navToolBar) | |
377 | + this.navToolBar.removeAll(true); | |
378 | + | |
379 | + this.multiPlotCheck = Ext.create('Ext.form.field.Checkbox', { | |
380 | + boxLabel : 'Linked to Multi Plot Mode', | |
381 | + scope: this, | |
382 | + handler: function(check, checked) { | |
383 | + } | |
384 | + }); | |
385 | + | |
386 | + var commonItemsCfg = [ | |
387 | + { | |
388 | + xtype: 'tbspacer', | |
389 | + width: 50 | |
390 | + }, | |
391 | + this.multiPlotCheck, | |
392 | + '->', | |
393 | + { | |
394 | + text: 'Get HST Data', | |
395 | + scope: this, | |
396 | + menu: [ | |
397 | + { | |
398 | + text: 'Giant Planet Auroral Emissions', | |
399 | + scope: this, | |
400 | + handler: function() | |
401 | + { | |
402 | + var me = this; | |
403 | + myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.astro.id, true, function (module) { | |
404 | + var startTime = new Date(me.crtContext.page.startTime*1000); | |
405 | + startTime = Ext.Date.add(startTime, Ext.Date.MINUTE, startTime.getTimezoneOffset()); | |
406 | + | |
407 | + var stopTime = new Date(me.crtContext.page.stopTime*1000); | |
408 | + stopTime = Ext.Date.add(stopTime, Ext.Date.MINUTE, stopTime.getTimezoneOffset()); | |
409 | + | |
410 | + module.createWindow(startTime,stopTime); | |
411 | + }); | |
412 | + } | |
413 | + } | |
414 | + ] | |
415 | + } | |
416 | + ]; | |
417 | + | |
418 | + if (isTimeTable) | |
419 | + { | |
420 | + var navigationItemsCfg = [ | |
421 | + { | |
422 | + text: 'Previous', | |
423 | + scope: this, | |
424 | + handler: function(){ | |
425 | + var ttFileIndex = this.crtTTFileIndex; | |
426 | + var ttintervalIndex = this.crtContext.page.ttIndex; | |
427 | + | |
428 | + if (ttintervalIndex <= 0) | |
429 | + { | |
430 | + if (ttFileIndex <= 0) | |
431 | + { | |
432 | + myDesktopApp.errorMsg('You are on the first interval of your request'); | |
433 | + return; | |
434 | + } | |
435 | + else | |
436 | + { | |
437 | + --ttFileIndex; | |
438 | + ttintervalIndex = 0; | |
439 | + } | |
440 | + } | |
441 | + else | |
442 | + --ttintervalIndex; | |
443 | + this.callInteractivePlot({'action' : 'goto', 'tabId' : this.tabId, 'ttFileIndex' : ttFileIndex, 'intIndex' : ttintervalIndex}); | |
444 | + } | |
445 | + }, | |
446 | + '-', | |
447 | + { | |
448 | + text: 'Next', | |
449 | + scope: this, | |
450 | + handler: function(){ | |
451 | + var ttFileIndex = this.crtTTFileIndex; | |
452 | + var ttintervalIndex = this.crtContext.page.ttIndex; | |
453 | + | |
454 | + if (ttintervalIndex >= this.crtContext.page.ttNbIntervals-1) | |
455 | + { | |
456 | + ++ttFileIndex; | |
457 | + ttintervalIndex = 0; | |
458 | + } | |
459 | + else | |
460 | + ++ttintervalIndex; | |
461 | + this.callInteractivePlot({'action' : 'goto', 'tabId' : this.tabId, 'ttFileIndex' : ttFileIndex, 'intIndex' : ttintervalIndex}); | |
462 | + } | |
463 | + }, | |
464 | + '-', | |
465 | + { | |
466 | + text: 'Go to Interval #', | |
467 | + scope: this, | |
468 | + handler: function(bt){ | |
469 | + var ttGotoNumberField = this.navToolBar.items.get('tt-goto-number-'+this.tabId); | |
470 | + var goToIndex = ttGotoNumberField.getValue() - 1; | |
471 | + if ((goToIndex < 0) || (goToIndex >= this.crtContext.page.ttNbIntervals)) | |
472 | + myDesktopApp.errorMsg('This interval number is outside of the current timeTable'); | |
473 | + else | |
474 | + this.callInteractivePlot({'action' : 'goto', 'tabId' : this.tabId, 'ttFileIndex' : this.crtTTFileIndex, 'intIndex' : goToIndex}); | |
475 | + } | |
476 | + }, | |
477 | + { | |
478 | + xtype: 'numberfield', | |
479 | + id : 'tt-goto-number-'+this.tabId, | |
480 | + hideTrigger: true, | |
481 | + width: 40, | |
482 | + minValue: 1 | |
483 | + }, | |
484 | + ' ', | |
485 | + ' ', | |
486 | + ' ', | |
487 | + { | |
488 | + xtype: 'textfield', | |
489 | + id: 'tt-table-'+this.tabId, | |
490 | + labelAlign: 'right', | |
491 | + labelWidth: 30, | |
492 | + fieldLabel: 'Table', | |
493 | + width: 130, | |
494 | + disabled : true | |
495 | + }, | |
496 | + { | |
497 | + xtype: 'textfield', | |
498 | + id: 'tt-number-'+this.tabId, | |
499 | + labelAlign: 'right', | |
500 | + labelWidth: 30, | |
501 | + fieldLabel: 'Int #', | |
502 | + width: 70, | |
503 | + disabled : true | |
504 | + }, | |
505 | + { | |
506 | + xtype: 'textfield', | |
507 | + id: 'tt-total-'+this.tabId, | |
508 | + labelAlign: 'right', | |
509 | + labelWidth: 30, | |
510 | + fieldLabel: 'Total', | |
511 | + width: 70, | |
512 | + disabled : true | |
513 | + } | |
514 | + ]; | |
515 | + } | |
516 | + else | |
517 | + { | |
518 | + var navigationItemsCfg = [ | |
519 | + { | |
520 | + text: 'Backward', | |
521 | + scope: this, | |
522 | + handler: function(){ | |
523 | + this.callInteractivePlot({'action' : 'backward', 'tabId' : this.tabId}); | |
524 | + } | |
525 | + }, | |
526 | + '-', | |
527 | + { | |
528 | + text: '1/2 Backward', | |
529 | + scope: this, | |
530 | + handler: function(){ | |
531 | + this.callInteractivePlot({'action' : 'halfbackward', 'tabId' : this.tabId}); | |
532 | + } | |
533 | + }, | |
534 | + '-', | |
535 | + { | |
536 | + text: '1/2 Forward', | |
537 | + scope: this, | |
538 | + handler: function(){ | |
539 | + this.callInteractivePlot({'action' : 'halfforward', 'tabId' : this.tabId}); | |
540 | + } | |
541 | + }, | |
542 | + '-', | |
543 | + { | |
544 | + text: 'Forward', | |
545 | + scope: this, | |
546 | + handler: function(){ | |
547 | + this.callInteractivePlot({'action' : 'forward', 'tabId' : this.tabId}); | |
548 | + } | |
549 | + } | |
550 | + ]; | |
421 | 551 | } |
422 | - else { | |
423 | - var toolConfig = { | |
552 | + | |
553 | + var toolItemsCfg = navigationItemsCfg; | |
554 | + Ext.each(commonItemsCfg, function(item){ | |
555 | + toolItemsCfg.push(item); | |
556 | + }); | |
557 | + | |
558 | + if (!this.navToolBar) | |
559 | + { | |
560 | + var toolConfig = { | |
424 | 561 | dock: 'top', |
425 | - items: [ { | |
426 | - text: 'Backward', | |
427 | - scope: this, | |
428 | - handler: function(){ | |
429 | - this.callInteractivePlot({'action' : 'backward', 'tabId' : this.tabId}); | |
430 | - } | |
431 | - }, | |
432 | - '-' , | |
433 | - { | |
434 | - text: '1/2 Backward', | |
435 | - scope: this, | |
436 | - handler: function(){ | |
437 | - this.callInteractivePlot({'action' : 'halfbackward', 'tabId' : this.tabId}); | |
438 | - } | |
439 | - }, | |
440 | - '-', | |
441 | - { | |
442 | - text: '1/2 Forward', | |
443 | - scope: this, | |
444 | - handler: function(){ | |
445 | - this.callInteractivePlot({'action' : 'halfforward', 'tabId' : this.tabId}); | |
446 | - } | |
447 | - }, | |
448 | - '-', | |
449 | - { | |
450 | - text: 'Forward', | |
451 | - scope: this, | |
452 | - handler: function(){ | |
453 | - this.callInteractivePlot({'action' : 'forward', 'tabId' : this.tabId}); | |
454 | - } | |
455 | - }, | |
456 | - '->', | |
457 | - interoperItemCfg | |
458 | - ] | |
562 | + items: toolItemsCfg | |
459 | 563 | }; |
564 | + | |
565 | + this.navToolBar = Ext.create('Ext.toolbar.Toolbar', toolConfig); | |
460 | 566 | } |
461 | - | |
462 | - var toolBar = Ext.create('Ext.toolbar.Toolbar', toolConfig); | |
463 | - return toolBar; | |
567 | + else | |
568 | + this.navToolBar.add(toolItemsCfg); | |
569 | + | |
570 | + this.isTTNavBar = isTimeTable; | |
464 | 571 | }, |
465 | 572 | |
466 | 573 | init: function(configResult){ |
... | ... | @@ -512,7 +619,11 @@ Ext.define('amdaUI.PlotTabResultUI', { |
512 | 619 | items: [] |
513 | 620 | }); |
514 | 621 | |
515 | - var navToolBar = this.createToolBar(false); | |
622 | + this.updateNavToolBar(!configResult.isInterval); | |
623 | + | |
624 | + this.updateTimeTableInfo(); | |
625 | + | |
626 | + this.multiPlotCheck.setValue(configResult.multiplot); | |
516 | 627 | |
517 | 628 | var plotResultTabPanelConfig = { |
518 | 629 | preventHeader : true, |
... | ... | @@ -520,7 +631,7 @@ Ext.define('amdaUI.PlotTabResultUI', { |
520 | 631 | items: [ |
521 | 632 | this.createPlotImage(configResult.folder, configResult.plotFile) |
522 | 633 | ], |
523 | - dockedItems: [navToolBar, mouseToolbar], | |
634 | + dockedItems: [this.navToolBar, mouseToolbar], | |
524 | 635 | plugins: [ |
525 | 636 | { |
526 | 637 | ptype: 'plotZoomPlugin', | ... | ... |
js/app/views/PlotUI.js
... | ... | @@ -113,6 +113,7 @@ Ext.define('amdaUI.PlotUI', { |
113 | 113 | */ |
114 | 114 | doPlot : function(){ |
115 | 115 | this.updateObject(); |
116 | + this.object.set('last-plotted-tab', this.plotTabs.getSelectedTabId()); | |
116 | 117 | var plotModule = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.plot.id); |
117 | 118 | if (plotModule) |
118 | 119 | plotModule.linkedNode.execute(); |
... | ... | @@ -143,16 +144,13 @@ Ext.define('amdaUI.PlotUI', { |
143 | 144 | this.plotTabs.updateTimeObject(); |
144 | 145 | }, |
145 | 146 | |
146 | - addTT : function(newTTName,newTTid) | |
147 | - { | |
148 | - 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); | |
149 | 152 | }, |
150 | 153 | |
151 | - addTTs : function(TTarray) { | |
152 | - // set TTTab | |
153 | - this.timeSelector.setTTTab(TTarray); | |
154 | - }, | |
155 | - | |
156 | 154 | /** |
157 | 155 | * Set Start-Stop from parameter info (Local & MyData) |
158 | 156 | */ |
... | ... | @@ -170,13 +168,13 @@ Ext.define('amdaUI.PlotUI', { |
170 | 168 | }, |
171 | 169 | |
172 | 170 | init : function(config) { |
173 | - 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'} ); | |
174 | 172 | |
175 | 173 | this.plotOutput = new amdaPlotComp.PlotOutputForm({flex: 2}); |
176 | 174 | |
177 | 175 | this.plotElement = new amdaPlotComp.PlotElementPanel({flex: 3}); |
178 | 176 | |
179 | - 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}); | |
180 | 178 | |
181 | 179 | this.optionsPanel = new Ext.form.Panel({ |
182 | 180 | layout: { |
... | ... | @@ -195,6 +193,7 @@ Ext.define('amdaUI.PlotUI', { |
195 | 193 | }); |
196 | 194 | |
197 | 195 | this.multiPlotIntervalPanel = new Ext.form.Panel({ |
196 | + flex: 2, | |
198 | 197 | layout: 'fit', |
199 | 198 | bodyStyle: { background : '#dfe8f6' }, |
200 | 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 | }); | ... | ... |