Commit 003ba315034bd2e1e6fee20a756ec5d3c9e72bad

Authored by Benjamin Renard
1 parent a0bf9157

Add Epoch Plot and Layouts for plot definition

js/app/models/PlotObjects/PlotLayoutAutoObject.js 0 → 100644
... ... @@ -0,0 +1,46 @@
  1 +/**
  2 + * Project  : AMDA-NG
  3 + * Name : PlotLayoutAutoObject.js
  4 + * @class amdaPlotObj.PlotLayoutAutoObject
  5 + * @extends Ext.data.Model
  6 + * @brief Plot Auto Layout Business Object Definition
  7 + * @author Benjamin Renard
  8 + * @version $Id: PlotLayoutAutoObject.js benjamin $
  9 + ******************************************************************************
  10 + * FT Id : Date : Name - Description
  11 + ******************************************************************************
  12 + * : :25/08/2015: BRE - file creation
  13 + */
  14 +
  15 +
  16 +Ext.define('amdaPlotObj.PlotLayoutAutoObject', {
  17 + extend: 'Ext.data.Model',
  18 +
  19 + requires: [
  20 + 'amdaPlotObj.PlotObjectConfig'
  21 + ],
  22 +
  23 + fields : [
  24 + {name: 'layout-panel-height', type: 'float'},
  25 + {name: 'layout-panel-spacing', type: 'float'},
  26 + {name: 'layout-expand', type: 'boolean'}
  27 + ],
  28 +
  29 + setDefaultValues: function()
  30 + {
  31 + this.set('layout-panel-height', amdaPlotObj.PlotObjectConfig.defaultValues.page.layout.panelHeight);
  32 + this.set('layout-panel-spacing', amdaPlotObj.PlotObjectConfig.defaultValues.page.layout.panelSpacing);
  33 + this.set('layout-expand', amdaPlotObj.PlotObjectConfig.defaultValues.page.layout.expand);
  34 + },
  35 +
  36 + getJsonValues : function()
  37 + {
  38 + var layoutValues = new Object();
  39 +
  40 + layoutValues['layout-panel-height'] = this.get('layout-panel-height');
  41 + layoutValues['layout-panel-spacing'] = this.get('layout-panel-spacing');
  42 + layoutValues['layout-expand'] = this.get('layout-expand');
  43 +
  44 + return layoutValues;
  45 + }
  46 +});
0 47 \ No newline at end of file
... ...
js/app/models/PlotObjects/PlotLayoutManualObject.js 0 → 100644
... ... @@ -0,0 +1,49 @@
  1 +/**
  2 + * Project  : AMDA-NG
  3 + * Name : PlotLayoutManualObject.js
  4 + * @class amdaPlotObj.PlotLayoutManualObject
  5 + * @extends Ext.data.Model
  6 + * @brief Plot Manual Layout Business Object Definition
  7 + * @author Benjamin Renard
  8 + * @version $Id: PlotLayoutManualObject.js benjamin $
  9 + ******************************************************************************
  10 + * FT Id : Date : Name - Description
  11 + ******************************************************************************
  12 + * : :25/08/2015: BRE - file creation
  13 + */
  14 +
  15 +
  16 +Ext.define('amdaPlotObj.PlotLayoutManualObject', {
  17 + extend: 'Ext.data.Model',
  18 +
  19 + requires: [
  20 + 'amdaPlotObj.PlotObjectConfig'
  21 + ],
  22 +
  23 + fields : [
  24 + {name: 'layout-timeplot-margin-left', type: 'float', useNull:true},
  25 + {name: 'layout-timeplot-margin-right', type: 'float', useNull:true},
  26 + {name: 'layout-xyplot-margin-left', type: 'float', useNull:true},
  27 + {name: 'layout-xyplot-margin-right', type: 'float', useNull:true}
  28 + ],
  29 +
  30 + setDefaultValues: function()
  31 + {
  32 + this.set('layout-timeplot-margin-left', null);
  33 + this.set('layout-timeplot-margin-right', null);
  34 + this.set('layout-xyplot-margin-left', null);
  35 + this.set('layout-xyplot-margin-right', null);
  36 + },
  37 +
  38 + getJsonValues : function()
  39 + {
  40 + var layoutValues = new Object();
  41 +
  42 + layoutValues['layout-timeplot-margin-left'] = this.get('layout-timeplot-margin-left') ? this.get('layout-timeplot-margin-left') : -1;
  43 + layoutValues['layout-timeplot-margin-right'] = this.get('layout-timeplot-margin-right') ? this.get('layout-timeplot-margin-right') : -1;
  44 + layoutValues['layout-xyplot-margin-left'] = this.get('layout-xyplot-margin-left') ? this.get('layout-xyplot-margin-left') : -1;
  45 + layoutValues['layout-xyplot-margin-right'] = this.get('layout-xyplot-margin-right') ? this.get('layout-xyplot-margin-right') : -1;
  46 +
  47 + return layoutValues;
  48 + }
  49 +});
0 50 \ No newline at end of file
... ...
js/app/models/PlotObjects/PlotLayoutVerticalObject.js 0 → 100644
... ... @@ -0,0 +1,58 @@
  1 +/**
  2 + * Project  : AMDA-NG
  3 + * Name : PlotLayoutVerticalObject.js
  4 + * @class amdaPlotObj.PlotLayoutVerticalObject
  5 + * @extends Ext.data.Model
  6 + * @brief Plot Vertical Layout Business Object Definition
  7 + * @author Benjamin Renard
  8 + * @version $Id: PlotLayoutVerticalObject.js benjamin $
  9 + ******************************************************************************
  10 + * FT Id : Date : Name - Description
  11 + ******************************************************************************
  12 + * : :25/08/2015: BRE - file creation
  13 + */
  14 +
  15 +
  16 +Ext.define('amdaPlotObj.PlotLayoutVerticalObject', {
  17 + extend: 'Ext.data.Model',
  18 +
  19 + requires: [
  20 + 'amdaPlotObj.PlotObjectConfig'
  21 + ],
  22 +
  23 + fields : [
  24 + {name: 'layout-panel-height', type: 'float'},
  25 + {name: 'layout-panel-spacing', type: 'float'},
  26 + {name: 'layout-expand', type: 'boolean'},
  27 + //{name: 'layout-timeplot-width', type: 'float', useNull:true},
  28 + {name: 'layout-timeplot-height', type: 'float', useNull:true},
  29 + {name: 'layout-xyplot-width', type: 'float', useNull:true},
  30 + {name: 'layout-xyplot-height', type: 'float', useNull:true}
  31 + ],
  32 +
  33 + setDefaultValues: function()
  34 + {
  35 + this.set('layout-panel-height', amdaPlotObj.PlotObjectConfig.defaultValues.page.layout.panelHeight);
  36 + this.set('layout-panel-spacing', amdaPlotObj.PlotObjectConfig.defaultValues.page.layout.panelSpacing);
  37 + this.set('layout-expand', amdaPlotObj.PlotObjectConfig.defaultValues.page.layout.expand);
  38 + //this.set('layout-timeplot-width', null);
  39 + this.set('layout-timeplot-height', null);
  40 + this.set('layout-xyplot-width', null);
  41 + this.set('layout-xyplot-height', null);
  42 + },
  43 +
  44 + getJsonValues : function()
  45 + {
  46 + var layoutValues = new Object();
  47 +
  48 + layoutValues['layout-panel-height'] = this.get('layout-panel-height');
  49 + layoutValues['layout-panel-spacing'] = this.get('layout-panel-spacing');
  50 + layoutValues['layout-expand'] = this.get('layout-expand');
  51 + //layoutValues['layout-timeplot-width'] = this.get('layout-timeplot-width') ? this.get('layout-timeplot-width') : -1;
  52 + layoutValues['layout-timeplot-height'] = this.get('layout-timeplot-height') ? this.get('layout-timeplot-height') : -1;
  53 + layoutValues['layout-xyplot-width'] = this.get('layout-xyplot-width') ? this.get('layout-xyplot-width') : -1;
  54 + layoutValues['layout-xyplot-height'] = this.get('layout-xyplot-height') ? this.get('layout-xyplot-height') : -1;
  55 +
  56 + return layoutValues;
  57 + }
  58 +});
0 59 \ No newline at end of file
... ...
js/app/models/PlotObjects/PlotObjectConfig.js
... ... @@ -36,6 +36,12 @@ Ext.define('amdaPlotObj.PlotObjectConfig', {
36 36 font : {
37 37 name : 'sans-serif',
38 38 size: '12'
  39 + },
  40 + layout : {
  41 + type : 'vertical',
  42 + panelHeight : 0.5,
  43 + panelSpacing : 0.05,
  44 + expand : false
39 45 }
40 46 },
41 47 panel : {
... ... @@ -79,9 +85,10 @@ Ext.define('amdaPlotObj.PlotObjectConfig', {
79 85 },
80 86 symbols : {
81 87 type : 'dot',
82   - size : 1,
  88 + size : 3,
83 89 color : 'auto'
84   - }
  90 + },
  91 + resamplingMode : 'xparam'
85 92 },
86 93 spectro : {
87 94 yAxis : 'y-left'
... ... @@ -222,5 +229,16 @@ Ext.define('amdaPlotObj.PlotObjectConfig', {
222 229 {'key' : '0', 'value' : '0'},
223 230 {'key' : '1', 'value' : '1'},
224 231 {'key' : '2', 'value' : '2'}
225   - ]
  232 + ],
  233 +
  234 + availablePageLayouts : [
  235 + {'key' : 'vertical', 'value' : 'Vertical'},
  236 + {'key' : 'auto', 'value' : 'Auto'},
  237 + {'key' : 'manual', 'value' : 'Manual'}
  238 + ],
  239 +
  240 + availableResamplingModes : [
  241 + {'key' : 'xparam', 'value' : 'X Parameter'},
  242 + {'key' : 'yparam', 'value' : 'Y Parameter'}
  243 + ]
226 244 });
227 245 \ No newline at end of file
... ...
js/app/models/PlotObjects/PlotPanelObject.js
... ... @@ -36,19 +36,31 @@ Ext.define('amdaPlotObj.PlotPanelObject', {
36 36 {name: 'panel-title-font-size', type: 'int'},
37 37 {name: 'panel-title-font-bold', type: 'boolean'},
38 38 {name: 'panel-title-font-italic', type: 'boolean'},
39   - {name: 'panel-margin-x', type: 'float'},
40   - {name: 'panel-margin-y', type: 'float'},
41 39 {name: 'panel-plot-type', type: 'string'},
42 40 {name: 'panel-font-activated', type: 'boolean'},
43 41 {name: 'panel-font-name', type: 'string'},
44 42 {name: 'panel-font-size', type: 'int'},
45 43 {name: 'panel-font-bold', type: 'boolean'},
46 44 {name: 'panel-font-italic', type: 'boolean'},
  45 + //Only used with layout Manual
  46 + {name: 'panel-bounds-x', type: 'float'},
  47 + {name: 'panel-bounds-y', type: 'float'},
  48 + {name: 'panel-bounds-width', type: 'float'},
  49 + {name: 'panel-bounds-height', type: 'float'},
  50 + {name: 'panel-margin-left', type: 'float', useNull:true},
  51 + {name: 'panel-margin-right', type: 'float', useNull:true},
  52 + //Only used with layout Vertical
  53 + {name: 'panel-prefered-width', type: 'float', useNull:true},
  54 + {name: 'panel-prefered-height', type: 'float', useNull:true},
  55 + //Only used for xyPlot
  56 + {name: 'panel-scatter-isotropic', type: 'boolean'},
47 57 //Only used for statusPlot and timePlot
48 58 {name: 'panel-status-position', type: 'string'},
49 59 {name: 'panel-status-colormap', type: 'int'},
50 60 //Only used for tickPlot and timePlot
51   - {name: 'panel-tick-format', type: 'int'}
  61 + {name: 'panel-tick-format', type: 'int'},
  62 + //Only used for epochPlot
  63 + {name: 'panel-epoch-centertimeid', type: 'string'}
52 64 ],
53 65  
54 66 associations : [
... ... @@ -142,7 +154,9 @@ Ext.define('amdaPlotObj.PlotPanelObject', {
142 154 return true;
143 155 },
144 156  
145   - updatePlotType: function(plotType, forceUpdate = false) {
  157 + updatePlotType: function(plotType, forceUpdate) {
  158 + forceUpdate = (typeof forceUpdate !== 'undefined') ? forceUpdate : false;
  159 +
146 160 if (!forceUpdate && (plotType == this.get('panel-plot-type')))
147 161 return;
148 162  
... ... @@ -178,20 +192,32 @@ Ext.define('amdaPlotObj.PlotPanelObject', {
178 192 this.set('panel-title-font-bold', false);
179 193 this.set('panel-title-font-italic', false);
180 194  
181   - this.set('panel-margin-x', 0);
182   - this.set('panel-margin-y', 0);
183   -
184 195 this.set('panel-font-activated', false);
185 196 this.set('panel-font-name', amdaPlotObj.PlotObjectConfig.defaultValues.panel.font.name);
186 197 this.set('panel-font-size', amdaPlotObj.PlotObjectConfig.defaultValues.panel.font.size);
187 198 this.set('panel-font-bold', false);
188 199 this.set('panel-font-italic', false);
189 200  
  201 + this.set('panel-bounds-x', 0);
  202 + this.set('panel-bounds-y', 0);
  203 + this.set('panel-bounds-width', 1);
  204 + this.set('panel-bounds-height', 1);
  205 +
  206 + this.set('panel-margin-left', null);
  207 + this.set('panel-margin-right', null);
  208 +
  209 + this.set('panel-prefered-width', null);
  210 + this.set('panel-prefered-height', null);
  211 +
  212 + this.set('panel-scatter-isotropic', false);
  213 +
190 214 this.set('panel-status-position', amdaPlotObj.PlotObjectConfig.defaultValues.panel.status.position);
191 215 this.set('panel-status-colormap', amdaPlotObj.PlotObjectConfig.defaultValues.panel.status.colorMap);
192 216  
193 217 this.set('panel-tick-format', "");
194 218  
  219 + this.set('panel-epoch-centertimeid', "");
  220 +
195 221 this.updatePlotType(amdaPlotObj.PlotObjectConfig.defaultValues.panel.plotType);
196 222 },
197 223  
... ... @@ -209,8 +235,6 @@ Ext.define('amdaPlotObj.PlotPanelObject', {
209 235 panelValues['panel-title-font-size'] = this.get('panel-title-font-size');
210 236 panelValues['panel-title-font-bold'] = this.get('panel-title-font-bold');
211 237 panelValues['panel-title-font-italic'] = this.get('panel-title-font-italic');
212   - panelValues['panel-margin-x'] = this.get('panel-margin-x');
213   - panelValues['panel-margin-y'] = this.get('panel-margin-y');
214 238 panelValues['panel-plot-type'] = this.get('panel-plot-type');
215 239 panelValues['panel-font-activated'] = this.get('panel-font-activated');
216 240 panelValues['panel-font-name'] = this.get('panel-font-name');
... ... @@ -218,6 +242,20 @@ Ext.define('amdaPlotObj.PlotPanelObject', {
218 242 panelValues['panel-font-bold'] = this.get('panel-font-bold');
219 243 panelValues['panel-font-italic'] = this.get('panel-font-italic');
220 244  
  245 + panelValues['panel-bounds-x'] = this.get('panel-bounds-x');
  246 + panelValues['panel-bounds-y'] = this.get('panel-bounds-y');
  247 + panelValues['panel-bounds-width'] = this.get('panel-bounds-width');
  248 + panelValues['panel-bounds-height'] = this.get('panel-bounds-height');
  249 +
  250 + panelValues['panel-margin-left'] = this.get('panel-margin-left') ? this.get('panel-margin-left') : -1;
  251 + panelValues['panel-margin-right'] = this.get('panel-margin-right') ? this.get('panel-margin-right') : -1;
  252 +
  253 + panelValues['panel-prefered-width'] = this.get('panel-prefered-width') ? this.get('panel-prefered-width') : -1;
  254 + panelValues['panel-prefered-height'] = this.get('panel-prefered-height') ? this.get('panel-prefered-height') : -1;
  255 +
  256 + if (this.get('panel-plot-type') == 'xyPlot')
  257 + panelValues['panel-scatter-isotropic'] = this.get('panel-scatter-isotropic');
  258 +
221 259 if ((this.get('panel-plot-type') == 'statusPlot') || (this.get('panel-plot-type') == 'timePlot'))
222 260 {
223 261 panelValues['panel-status-position'] = this.get('panel-status-position');
... ... @@ -229,6 +267,9 @@ Ext.define('amdaPlotObj.PlotPanelObject', {
229 267 panelValues['panel-tick-format'] = this.get('panel-tick-format');
230 268 }
231 269  
  270 + if (this.get('panel-plot-type') == 'epochPlot')
  271 + panelValues['panel-epoch-centertimeid'] = this.get('panel-epoch-centertimeid');
  272 +
232 273 panelValues['axes'] = [];
233 274  
234 275 this.axes().each(function (axe, index) {
... ...
js/app/models/PlotObjects/PlotParamObject.js
... ... @@ -39,8 +39,10 @@ Ext.define('amdaPlotObj.PlotParamObject', {
39 39 }
40 40 ],
41 41  
42   - updateDrawingType: function(type, forceUpdate = false)
  42 + updateDrawingType: function(type, forceUpdate)
43 43 {
  44 + forceUpdate = (typeof forceUpdate !== 'undefined') ? forceUpdate : false;
  45 +
44 46 if (!forceUpdate && (type == this.get('param-drawing-type')))
45 47 return;
46 48  
... ...
js/app/models/PlotObjects/PlotRequestObject.js
... ... @@ -74,7 +74,7 @@ Ext.define('amdaPlotObj.PlotRequestObject', {
74 74 requestValues['one-file-per-interval'] = this.get('one-file-per-interval');
75 75 requestValues['request-name'] = this.get('request-name');
76 76  
77   - requestValues['timesrc'] = "Interval";//BRE - ToDo this.get('timesrc');
  77 + requestValues['timesrc'] = this.get('timesrc');
78 78 // if there's at least one timeTable name into 'timeTables' collection
79 79 if (this.get('timesrc') == amdaModel.AmdaTimeObject.inputTimeSrc[0] && this.get('timeTables') && this.get('timeTables').length){
80 80 // get complete timeTables collection
... ...
js/app/models/PlotObjects/PlotSerieObject.js
... ... @@ -32,7 +32,8 @@ Ext.define('amdaPlotObj.PlotSerieObject', {
32 32 {name: 'serie-symbols-color', type: 'string'},
33 33 {name: 'serie-colored-param', type: 'string'},
34 34 //Only used for xyPlot
35   - {name: 'serie-xaxis-param', type: 'string'}
  35 + {name: 'serie-xaxis-param', type: 'string'},
  36 + {name: 'serie-resampling-mode', type: 'string'}
36 37 ],
37 38  
38 39 setDefaultValues: function()
... ... @@ -48,6 +49,7 @@ Ext.define('amdaPlotObj.PlotSerieObject', {
48 49 this.set('serie-symbols-color', amdaPlotObj.PlotObjectConfig.defaultValues.serie.symbols.color);
49 50 this.set('serie-colored-param', '');
50 51 this.set('serie-xaxis-param', '');
  52 + this.set('serie-resampling-mode', amdaPlotObj.PlotObjectConfig.defaultValues.serie.resamplingMode);
51 53 },
52 54  
53 55 getJsonValues : function()
... ... @@ -65,6 +67,7 @@ Ext.define('amdaPlotObj.PlotSerieObject', {
65 67 serieValues['serie-symbols-color'] = this.get('serie-symbols-color');
66 68 serieValues['serie-colored-param'] = this.get('serie-colored-param');
67 69 serieValues['serie-xaxis-param'] = this.get('serie-xaxis-param');
  70 + serieValues['serie-resampling-mode'] = this.get('serie-resampling-mode');
68 71  
69 72 return serieValues;
70 73 }
... ...
js/app/models/PlotObjects/PlotTabObject.js
... ... @@ -21,7 +21,10 @@ Ext.define('amdaPlotObj.PlotTabObject', {
21 21  
22 22 requires: [
23 23 'amdaPlotObj.PlotObjectConfig',
24   - 'amdaPlotObj.PlotPanelObject'
  24 + 'amdaPlotObj.PlotPanelObject',
  25 + 'amdaPlotObj.PlotLayoutVerticalObject',
  26 + 'amdaPlotObj.PlotLayoutAutoObject',
  27 + 'amdaPlotObj.PlotLayoutManualObject'
25 28 ],
26 29  
27 30 fields : [
... ... @@ -46,7 +49,9 @@ Ext.define('amdaPlotObj.PlotTabObject', {
46 49 {name: 'page-font-name', type: 'string'},
47 50 {name: 'page-font-size', type: 'int'},
48 51 {name: 'page-font-bold', type: 'boolean'},
49   - {name: 'page-font-italic', type: 'boolean'}
  52 + {name: 'page-font-italic', type: 'boolean'},
  53 + {name: 'page-layout-type', type: 'string'},
  54 + {name: 'page-layout-object', type: 'auto'}
50 55 ],
51 56  
52 57 associations : [
... ... @@ -77,6 +82,36 @@ Ext.define('amdaPlotObj.PlotTabObject', {
77 82 return true;
78 83 },
79 84  
  85 + setLayout: function(layoutType, forceUpdate)
  86 + {
  87 + forceUpdate = (typeof forceUpdate !== 'undefined') ? forceUpdate : false;
  88 +
  89 + if (!forceUpdate && (layoutType == this.get('page-layout-type')))
  90 + return;
  91 +
  92 + this.set('page-layout-type', layoutType);
  93 +
  94 + //Create layout object in relation with the type
  95 + switch (layoutType)
  96 + {
  97 + case 'vertical' :
  98 + this.set('page-layout-object', new amdaPlotObj.PlotLayoutVerticalObject());
  99 + break;
  100 + case 'auto' :
  101 + this.set('page-layout-object', new amdaPlotObj.PlotLayoutAutoObject());
  102 + break;
  103 + case 'manual' :
  104 + this.set('page-layout-object', new amdaPlotObj.PlotLayoutManualObject());
  105 + break;
  106 + default :
  107 + this.set('page-layout-object', null);
  108 + }
  109 +
  110 + //Set layout object to default status
  111 + if (this.get('page-layout-object') != null)
  112 + this.get('page-layout-object').setDefaultValues();
  113 + },
  114 +
80 115 setDefaultValues: function()
81 116 {
82 117 this.set('page-title-text', '');
... ... @@ -102,6 +137,9 @@ Ext.define('amdaPlotObj.PlotTabObject', {
102 137 this.set('page-font-size', amdaPlotObj.PlotObjectConfig.defaultValues.page.font.size);
103 138 this.set('page-font-bold', false);
104 139 this.set('page-font-italic', false);
  140 +
  141 + this.set('page-layout-type', amdaPlotObj.PlotObjectConfig.defaultValues.page.layout.type);
  142 + this.setLayout(amdaPlotObj.PlotObjectConfig.defaultValues.page.layout.type, true);
105 143 },
106 144  
107 145 getJsonValues : function()
... ... @@ -130,6 +168,10 @@ Ext.define('amdaPlotObj.PlotTabObject', {
130 168 tabValues['page-font-bold'] = this.get('page-font-bold');
131 169 tabValues['page-font-italic'] = this.get('page-font-italic');
132 170  
  171 + tabValues['page-layout-type'] = this.get('page-layout-type');
  172 + if (this.get('page-layout-object') != null)
  173 + tabValues['page-layout-object'] = this.get('page-layout-object').getJsonValues();
  174 +
133 175 tabValues['panels'] = [];
134 176  
135 177 this.panels().each(function (panel, index) {
... ...
js/app/models/PlotObjects/PlotTreeNode.js
... ... @@ -66,7 +66,11 @@ Ext.define('amdaPlotObj.PlotPageTreeNode', {
66 66  
67 67 getAdditionalText: function()
68 68 {
69   - return ' ('+this.object.get('page-dimension')+', '+this.object.get('page-orientation')+')';
  69 + var addText = ' ('+this.object.get('page-dimension')+', '+this.object.get('page-orientation');
  70 + if (this.object.get('page-superpose-mode'))
  71 + addText += ', superpose';
  72 + addText += ')';
  73 + return addText;
70 74 }
71 75 });
72 76  
... ... @@ -79,7 +83,12 @@ Ext.define('amdaPlotObj.PlotLayoutTreeNode', {
79 83  
80 84 text: 'Layout',
81 85  
82   - type: 'layout'
  86 + type: 'layout',
  87 +
  88 + getAdditionalText: function()
  89 + {
  90 + return ' ('+this.object.get('page-layout-type')+')';
  91 + }
83 92 });
84 93  
85 94 Ext.define('amdaPlotObj.PlotPanelsTreeNode', {
... ... @@ -105,7 +114,8 @@ Ext.define('amdaPlotObj.PlotPanelTreeNode', {
105 114  
106 115 getAdditionalText: function()
107 116 {
108   - return ' ('+this.object.get('panel-plot-type')+')';
  117 + var addText = ' ('+this.object.get('panel-plot-type')+')';
  118 + return addText;
109 119 }
110 120 });
111 121  
... ...
js/app/views/NewPlotUI.js
... ... @@ -55,7 +55,7 @@ Ext.define('amdaUI.NewPlotUI', {
55 55 var basicForm = this.formPanel.getForm();
56 56 basicForm.updateRecord(this.object);
57 57 this.object.set('timesrc', timeSource);
58   - if (timeSource === amdaModel.AmdaTimeObject.inputTimeSrc[0])
  58 + if (timeSource === amdaModel.AmdaTimeObject.inputTimeSrc[0])
59 59 this.object.set('timeTables',this.timeSelector.TTGrid.getStore().data.items);
60 60  
61 61 // fire execution
... ... @@ -76,6 +76,16 @@ Ext.define('amdaUI.NewPlotUI', {
76 76 return false;
77 77 },
78 78  
  79 + addTT : function(newTTName,newTTid)
  80 + {
  81 + this.timeSelector.addTT(newTTName,newTTid);
  82 + },
  83 +
  84 + addTTs : function(TTarray) {
  85 + // set TTTab
  86 + this.timeSelector.setTTTab(TTarray);
  87 + },
  88 +
79 89 init : function(config) {
80 90 this.timeSelector = new amdaUI.TimeSelectorUI( { id: 'plotTimeSelector' + config.id, flex: 1} );
81 91  
... ...
js/app/views/PlotComponents/PlotElementPanel.js
... ... @@ -18,7 +18,8 @@ Ext.define('amdaPlotComp.PlotElementPanel', {
18 18 'amdaPlotComp.PlotTimeAxisForm',
19 19 'amdaPlotComp.PlotEpochAxisForm',
20 20 'amdaPlotComp.PlotColorAxisForm',
21   - 'amdaPlotComp.PlotParamForm'
  21 + 'amdaPlotComp.PlotParamForm',
  22 + 'amdaPlotComp.PlotLayoutForm'
22 23 ],
23 24  
24 25 elementFormsManager : new Ext.AbstractManager(),
... ... @@ -82,6 +83,9 @@ Ext.define('amdaPlotComp.PlotElementPanel', {
82 83 case 'param' :
83 84 this.elementFormsManager.register(new amdaPlotComp.PlotParamForm({id : formId}));
84 85 break;
  86 + case 'layout' :
  87 + this.elementFormsManager.register(new amdaPlotComp.PlotLayoutForm({id : formId}));
  88 + break;
85 89 case '' :
86 90 this.elementFormsManager.register(new Ext.form.Label({id : formId, text: 'Select an element to the tree to show options'}));
87 91 break;
... ...
js/app/views/PlotComponents/PlotEpochAxisForm.js
... ... @@ -19,6 +19,6 @@ Ext.define('amdaPlotComp.PlotEpochAxisForm', {
19 19 this.addStandardCheck('axis-epoch-normalized', 'Normalized')
20 20 ];
21 21  
22   - return Ext.Array.merge(timeItems, this.callParent());
  22 + return Ext.Array.merge(epochItems, this.callParent());
23 23 }
24 24 });
25 25 \ No newline at end of file
... ...
js/app/views/PlotComponents/PlotLayoutAutoForm.js 0 → 100644
... ... @@ -0,0 +1,26 @@
  1 +/**
  2 + * Project  : AMDA-NG
  3 + * Name : PlotLayoutAutoForm.js
  4 + * @class amdaPlotComp.PlotLayoutAutoForm
  5 + * @extends amdaPlotComp.PlotStandardForm
  6 + * @brief Form to define specifics Auto layout options
  7 + * @author Benjamin Renard
  8 + * @version $Id: PlotLayoutAutoForm.js benjamin $
  9 + */
  10 +
  11 +Ext.define('amdaPlotComp.PlotLayoutAutoForm', {
  12 + extend: 'amdaPlotComp.PlotStandardForm',
  13 +
  14 + setObject : function(object) {
  15 + this.object = object.get('page-layout-object');
  16 + this.loadRecord(this.object);
  17 + },
  18 +
  19 + getFormItems: function() {
  20 + return [
  21 + this.addStandardFloat('layout-panel-height', 'Panels height', 0, 1),
  22 + this.addStandardFloat('layout-panel-spacing', 'Panels spacing', 0, 1),
  23 + this.addStandardCheck('layout-expand', 'Expand panels')
  24 + ];
  25 + }
  26 +});
0 27 \ No newline at end of file
... ...
js/app/views/PlotComponents/PlotLayoutForm.js 0 → 100644
... ... @@ -0,0 +1,91 @@
  1 +/**
  2 + * Project  : AMDA-NG
  3 + * Name : PlotLayoutForm.js
  4 + * @class amdaPlotComp.PlotLayoutForm
  5 + * @extends amdaPlotComp.PlotStandardForm
  6 + * @brief Form to define layout options
  7 + * @author Benjamin Renard
  8 + * @version $Id: PlotLayoutForm.js benjamin $
  9 + */
  10 +
  11 +Ext.define('amdaPlotComp.PlotLayoutForm', {
  12 + extend: 'amdaPlotComp.PlotStandardForm',
  13 +
  14 + requires: [
  15 + 'amdaPlotComp.PlotLayoutVerticalForm',
  16 + 'amdaPlotComp.PlotLayoutAutoForm',
  17 + 'amdaPlotComp.PlotLayoutManualForm'
  18 + ],
  19 +
  20 + layoutOptionsContainer: null,
  21 +
  22 + layoutOptionsFormsManager : new Ext.AbstractManager(),
  23 +
  24 + setObject : function(object) {
  25 + this.object = object;
  26 + this.loadRecord(this.object);
  27 + this.updateLayoutOptions();
  28 + },
  29 +
  30 + getLayoutOptionsForm: function(type) {
  31 + var formId = '';
  32 + if (!type || (type == ''))
  33 + formId = 'none';
  34 + else
  35 + formId = type;
  36 +
  37 + formId += '-layout-options-form';
  38 +
  39 + if (!this.layoutOptionsFormsManager.get(formId))
  40 + {
  41 + switch(type)
  42 + {
  43 + //Create layout options form
  44 + case 'vertical' :
  45 + this.layoutOptionsFormsManager.register(new amdaPlotComp.PlotLayoutVerticalForm({id : formId}));
  46 + break;
  47 + case 'auto' :
  48 + this.layoutOptionsFormsManager.register(new amdaPlotComp.PlotLayoutAutoForm({id : formId}));
  49 + break;
  50 + case 'manual' :
  51 + this.layoutOptionsFormsManager.register(new amdaPlotComp.PlotLayoutManualForm({id : formId}));
  52 + break;
  53 + default :
  54 + this.layoutOptionsFormsManager.register(new Ext.form.Label({id : formId, text: 'No available options for this layout type'}));
  55 + }
  56 + }
  57 +
  58 + return this.layoutOptionsFormsManager.get(formId);
  59 +
  60 + },
  61 +
  62 + updateLayoutOptions: function(forceUpdate) {
  63 + var typeField = this.getForm().findField('page-layout-type');
  64 + var layoutType = typeField.getValue();
  65 + this.object.setLayout(layoutType, forceUpdate);
  66 +
  67 + this.layoutOptionsContainer.removeAll(false);
  68 +
  69 + var layoutOptionsForm = this.getLayoutOptionsForm(layoutType);
  70 + this.layoutOptionsContainer.add(layoutOptionsForm);
  71 + layoutOptionsForm.crtTree = this.crtTree;
  72 + if (layoutOptionsForm.setObject)
  73 + layoutOptionsForm.setObject(this.object);
  74 + },
  75 +
  76 + getFormItems: function() {
  77 + var me = this;
  78 +
  79 + this.layoutOptionsContainer = Ext.create('Ext.container.Container', {
  80 + layout: 'fit'
  81 + });
  82 +
  83 + return [
  84 + this.addStandardCombo('page-layout-type', 'Layout type', amdaPlotObj.PlotObjectConfig.availablePageLayouts, function(name, value, oldValue) {
  85 + me.updateLayoutOptions(value != oldValue);
  86 + me.crtTree.getView().refresh();
  87 + }),
  88 + this.layoutOptionsContainer
  89 + ];
  90 + }
  91 +});
0 92 \ No newline at end of file
... ...
js/app/views/PlotComponents/PlotLayoutManualForm.js 0 → 100644
... ... @@ -0,0 +1,35 @@
  1 +/**
  2 + * Project  : AMDA-NG
  3 + * Name : PlotLayoutManualForm.js
  4 + * @class amdaPlotComp.PlotLayoutManualForm
  5 + * @extends amdaPlotComp.PlotStandardForm
  6 + * @brief Form to define specifics Manual layout options
  7 + * @author Benjamin Renard
  8 + * @version $Id: PlotLayoutManualForm.js benjamin $
  9 + */
  10 +
  11 +Ext.define('amdaPlotComp.PlotLayoutManualForm', {
  12 + extend: 'amdaPlotComp.PlotStandardForm',
  13 +
  14 + setObject : function(object) {
  15 + this.object = object.get('page-layout-object');
  16 + this.loadRecord(this.object);
  17 + },
  18 +
  19 + getFormItems: function() {
  20 + var timePlotMarginItems = [
  21 + this.addStandardFloat('layout-timeplot-margin-left', 'Panels left margin', 0, 100, true),
  22 + this.addStandardFloat('layout-timeplot-margin-right', 'Panels right margin', 0, 100, true)
  23 + ];
  24 +
  25 + var xyPlotMarginItems = [
  26 + this.addStandardFloat('layout-xyplot-margin-left', 'Panels left margin', 0, 100, true),
  27 + this.addStandardFloat('layout-xyplot-margin-right', 'Panels right margin', 0, 100, true)
  28 + ];
  29 +
  30 + return [
  31 + this.addStandardFieldSet('Time / Epoch Panels Margins', '', timePlotMarginItems),
  32 + this.addStandardFieldSet('Scatter / Instant Panels Margins', '', xyPlotMarginItems)
  33 + ];
  34 + }
  35 +});
0 36 \ No newline at end of file
... ...
js/app/views/PlotComponents/PlotLayoutVerticalForm.js 0 → 100644
... ... @@ -0,0 +1,38 @@
  1 +/**
  2 + * Project  : AMDA-NG
  3 + * Name : PlotLayoutVerticalForm.js
  4 + * @class amdaPlotComp.PlotLayoutVerticalForm
  5 + * @extends amdaPlotComp.PlotStandardForm
  6 + * @brief Form to define specifics vertical layout options
  7 + * @author Benjamin Renard
  8 + * @version $Id: PlotLayoutVerticalForm.js benjamin $
  9 + */
  10 +
  11 +Ext.define('amdaPlotComp.PlotLayoutVerticalForm', {
  12 + extend: 'amdaPlotComp.PlotStandardForm',
  13 +
  14 + setObject : function(object) {
  15 + this.object = object.get('page-layout-object');
  16 + this.loadRecord(this.object);
  17 + },
  18 +
  19 + getFormItems: function() {
  20 + var timePlotDimItems = [
  21 + //this.addStandardFloat('layout-timeplot-width', 'Panels width', 0, 1, true),
  22 + this.addStandardFloat('layout-timeplot-height', 'Panels height', 0, 1, true)
  23 + ];
  24 +
  25 + var xyPlotDimItems = [
  26 + this.addStandardFloat('layout-xyplot-width', 'Panels width', 0, 1, true),
  27 + this.addStandardFloat('layout-xyplot-height', 'Panels height', 0, 1, true)
  28 + ];
  29 +
  30 + return [
  31 + this.addStandardFloat('layout-panel-height', 'General Panels height', 0, 1),
  32 + this.addStandardFloat('layout-panel-spacing', 'Panels spacing', 0, 1),
  33 + this.addStandardCheck('layout-expand', 'Expand panels'),
  34 + this.addStandardFieldSet('Time / Epoch Panels Dimensions', '', timePlotDimItems),
  35 + this.addStandardFieldSet('Scatter / Instant Panels Dimensions', '', xyPlotDimItems)
  36 + ];
  37 + }
  38 +});
0 39 \ No newline at end of file
... ...
js/app/views/PlotComponents/PlotPageForm.js
... ... @@ -25,10 +25,18 @@ Ext.define('amdaPlotComp.PlotPageForm', {
25 25 this.addStandardFloat('page-margin-y', 'Vertical', 0, 100)
26 26 ];
27 27  
  28 + var me = this;
28 29 return [
29 30 //this.addStandardCombo('page-mode', 'Mode', amdaPlotObj.PlotObjectConfig.availablePageModes),
30   - this.addStandardCombo('page-orientation', 'Orientation', amdaPlotObj.PlotObjectConfig.availablePageOrientations),
31   - this.addStandardCombo('page-dimension', 'Dimension', amdaPlotObj.PlotObjectConfig.availablePageDimensions),
  31 + this.addStandardCombo('page-orientation', 'Orientation', amdaPlotObj.PlotObjectConfig.availablePageOrientations, function(name, value) {
  32 + me.crtTree.getView().refresh();
  33 + }),
  34 + this.addStandardCombo('page-dimension', 'Dimension', amdaPlotObj.PlotObjectConfig.availablePageDimensions, function(name, value) {
  35 + me.crtTree.getView().refresh();
  36 + }),
  37 + this.addStandardCheck('page-superpose-mode', 'Epoch Superposed Mode', function(name, value) {
  38 + me.crtTree.getView().refresh();
  39 + }),
32 40 this.addStandardFieldSet('Title', '', titleItems),
33 41 this.addStandardFieldSet('Margins', 'page-margins-activated', marginItems),
34 42 this.addStandardFont('page-font')
... ...
js/app/views/PlotComponents/PlotPanelForm.js
... ... @@ -11,27 +11,90 @@
11 11 Ext.define('amdaPlotComp.PlotPanelForm', {
12 12 extend: 'amdaPlotComp.PlotStandardForm',
13 13  
14   - updateStatusOptions: function(plotType) {
  14 + setObject : function(object) {
  15 + this.object = object;
  16 + this.loadRecord(this.object);
  17 + this.updateOptions(this.object.get('panel-plot-type'));
  18 + },
  19 +
  20 + updateOptions: function(plotType) {
15 21 var plotTypeField = this.getForm().findField('panel-plot-type');
  22 +
  23 + //Scatter field set visibility
  24 + var isotropicField = this.getForm().findField('panel-scatter-isotropic');
  25 +
  26 + isotropicField.setVisible(plotType == 'xyPlot');
  27 +
  28 + //Status field set visibility
16 29 var statusBarAvailable = ((plotType == 'timePlot') || (plotType == 'statusPlot'));
17 30  
18 31 var statusPositionField = this.getForm().findField('panel-status-position');
19 32 var statusFieldSet = statusPositionField.findParentByType('fieldset');
  33 +
20 34 statusFieldSet.setVisible(statusBarAvailable);
  35 +
  36 + //Tick field set visibility
  37 + var tickBarAvailable = ((plotType == 'timePlot') || (plotType == 'tickPlot'));
  38 +
  39 + var tickFormatField = this.getForm().findField('panel-tick-format');
  40 + var tickFieldSet = tickFormatField.findParentByType('fieldset');
  41 +
  42 + tickFieldSet.setVisible(tickBarAvailable);
  43 +
  44 + //Epoch center time id visibility
  45 + var centerTimeIdField = this.getForm().findField('panel-epoch-centertimeid');
  46 +
  47 + centerTimeIdField.setVisible(plotType == 'epochPlot');
  48 +
  49 + //Options in relation with the layout
  50 + this.updateLayoutOptions(plotType);
  51 + },
  52 +
  53 + updateLayoutOptions: function(plotType) {
  54 + //Margins and Bounds visibility in relation with the layout type
  55 + var isManualLayout = this.crtTree.tabObject && (this.crtTree.tabObject.get('page-layout-type') == 'manual');
  56 + var isVerticalLayout = this.crtTree.tabObject && (this.crtTree.tabObject.get('page-layout-type') == 'vertical');
  57 +
  58 + var xBoundsField = this.getForm().findField('panel-bounds-x');
  59 + var boundFieldSet = xBoundsField.findParentByType('fieldset');
  60 + boundFieldSet.setVisible(isManualLayout);
  61 +
  62 + var marginLeftField = this.getForm().findField('panel-margin-left');
  63 + var marginsFieldSet = marginLeftField.findParentByType('fieldset');
  64 + marginsFieldSet.setVisible(isManualLayout);
  65 +
  66 + var preferedWidthField = this.getForm().findField('panel-prefered-width');
  67 + var preferedDimFieldSet = preferedWidthField.findParentByType('fieldset');
  68 + preferedDimFieldSet.setVisible(isVerticalLayout);
  69 + preferedWidthField.setVisible((plotType == 'xyPlot') || (plotType == 'instantPlot'));
21 70 },
22 71  
23 72 getFormItems: function() {
24   - var titleItems = [
25   - this.addStandardText('panel-title-text', 'Text'),
26   - this.addStandardColor('panel-title-color', 'Color', amdaPlotObj.PlotObjectConfig.availableColors),
27   - this.addStandardCombo('panel-title-position', 'Position', amdaPlotObj.PlotObjectConfig.availableTitlePositions),
28   - this.addStandardCombo('panel-title-alignment', 'Alignment', amdaPlotObj.PlotObjectConfig.availableTitleAlignments),
29   - this.addStandardFont('panel-title-font')
  73 +
  74 +
  75 + var boundsItems = [
  76 + this.addStandardFloat('panel-bounds-x', 'X Position', 0, 1),
  77 + this.addStandardFloat('panel-bounds-y', 'Y Position', 0, 1),
  78 + this.addStandardFloat('panel-bounds-width', 'Width', 0, 1),
  79 + this.addStandardFloat('panel-bounds-height', 'Height', 0, 1)
30 80 ];
31 81  
32 82 var marginItems = [
33   - this.addStandardFloat('panel-margin-x', 'Horizontal', 0, 100),
34   - this.addStandardFloat('panel-margin-y', 'Vertical', 0, 100)
  83 + this.addStandardFloat('panel-margin-left', 'Left Margin', 0, 100, true),
  84 + this.addStandardFloat('panel-margin-right', 'Right Margin', 0, 100, true)
  85 + ];
  86 +
  87 + var preferedDimItems = [
  88 + this.addStandardFloat('panel-prefered-width', 'Prefered Width', 0, 1, true),
  89 + this.addStandardFloat('panel-prefered-height', 'Prefered Height', 0, 1, true)
  90 + ];
  91 +
  92 + var titleItems = [
  93 + this.addStandardText('panel-title-text', 'Text'),
  94 + this.addStandardColor('panel-title-color', 'Color', amdaPlotObj.PlotObjectConfig.availableColors),
  95 + this.addStandardCombo('panel-title-position', 'Position', amdaPlotObj.PlotObjectConfig.availableTitlePositions),
  96 + this.addStandardCombo('panel-title-alignment', 'Alignment', amdaPlotObj.PlotObjectConfig.availableTitleAlignments),
  97 + this.addStandardFont('panel-title-font')
35 98 ];
36 99  
37 100 var statusItems = [
... ... @@ -43,20 +106,27 @@ Ext.define('amdaPlotComp.PlotPanelForm', {
43 106 this.addStandardText('panel-tick-format', 'Format')
44 107 ];
45 108  
  109 +
  110 +
46 111 var me = this;
47 112 return [
48 113 this.addStandardCombo('panel-plot-type', 'Plot type', amdaPlotObj.PlotObjectConfig.availablePlotTypes, function(name, value, oldValue) {
49 114 if (value != oldValue)
50 115 {
51 116 me.object.updatePlotType(value, true);
52   - if (me.crtTree.isSimplifiedView)
53   - me.crtTree.buildPanelAxesNode(me.object);
54   - me.updateStatusOptions(value);
  117 + if (!me.crtTree.isSimplifiedView)
  118 + me.crtTree.buildPanelAxesNode(me.object);
  119 + me.crtTree.getView().refresh();
  120 + me.updateOptions(value);
55 121 }
56 122 }),
  123 + this.addStandardCheck('panel-scatter-isotropic', 'Isotropic'),
  124 + this.addStandardText('panel-epoch-centertimeid', 'Epoch Center Time Id'),
57 125 this.addStandardColor('panel-background-color', 'Background Color', amdaPlotObj.PlotObjectConfig.availableBackgroundColors),
  126 + this.addStandardFieldSet('Manual Bounds', '', boundsItems),
  127 + this.addStandardFieldSet('Manual Margins', '', marginItems),
  128 + this.addStandardFieldSet('Prefered Dimensions', '', preferedDimItems),
58 129 this.addStandardFieldSet('Title', '', titleItems),
59   - this.addStandardFieldSet('Margins', '', marginItems),
60 130 this.addStandardFont('panel-font'),
61 131 this.addStandardFieldSet('Status Bars', '', statusItems),
62 132 this.addStandardFieldSet('Ticks Bars', '', tickItems)
... ...
js/app/views/PlotComponents/PlotParamForm.js
... ... @@ -92,6 +92,7 @@ Ext.define('amdaPlotComp.PlotParamForm', {
92 92 return [
93 93 this.addStandardCombo('param-drawing-type', 'Drawing type', [{'key' : '', 'value' : 'None'}], function(name, value, oldValue) {
94 94 me.updateDrawingOptions(value != oldValue);
  95 + me.crtTree.getView().refresh();
95 96 }),
96 97 this.drawingOptionsContainer
97 98 ];
... ...
js/app/views/PlotComponents/PlotSerieForm.js
... ... @@ -19,8 +19,10 @@ Ext.define('amdaPlotComp.PlotSerieForm', {
19 19  
20 20 updateOptions: function(plotType) {
21 21 var xParamField = this.getForm().findField('serie-xaxis-param');
  22 + var resamplingModeField = this.getForm().findField('serie-resampling-mode');
22 23 var isScatter = (plotType == 'xyPlot');
23 24 xParamField.setVisible(isScatter);
  25 + resamplingModeField.setVisible(isScatter);
24 26 },
25 27  
26 28 getFormItems: function() {
... ... @@ -38,6 +40,7 @@ Ext.define('amdaPlotComp.PlotSerieForm', {
38 40  
39 41 return [
40 42 this.addStandardParamDropTarget('serie-xaxis-param', 'X Parameter'),
  43 + this.addStandardCombo('serie-resampling-mode', 'Reference parameter for resampling', amdaPlotObj.PlotObjectConfig.availableResamplingModes),
41 44 this.addStandardCombo('serie-yaxis', 'Y axis', amdaPlotObj.PlotObjectConfig.availableYAxes),
42 45 this.addStandardParamDropTarget('serie-colored-param', 'Colored Parameter'),
43 46 this.addStandardFieldSet('Lines', 'serie-lines-activated', linesItems),
... ...
js/app/views/PlotComponents/PlotStandardForm.js
... ... @@ -50,7 +50,9 @@ Ext.define('amdaPlotComp.PlotStandardForm', {
50 50 };
51 51 },
52 52  
53   - addStandardFloat: function(name, label, min, max) {
  53 + addStandardFloat: function(name, label, min, max, allowBlank) {
  54 + allowBlank = (typeof allowBlank !== 'undefined') ? allowBlank : false;
  55 +
54 56 return {
55 57 xtype: 'numberfield',
56 58 name: name,
... ... @@ -58,6 +60,7 @@ Ext.define('amdaPlotComp.PlotStandardForm', {
58 60 decimalPrecision : 3,
59 61 minValue : min,
60 62 maxValue : max,
  63 + allowBlank : allowBlank,
61 64 listeners: {
62 65 change: function(field, newValue, oldValue, eOpts) {
63 66 this.object.set(name, newValue);
... ... @@ -93,7 +96,7 @@ Ext.define('amdaPlotComp.PlotStandardForm', {
93 96 };
94 97 },
95 98  
96   - addStandardCheck: function(name, label) {
  99 + addStandardCheck: function(name, label, onChange) {
97 100 return {
98 101 xtype: 'checkbox',
99 102 name: name,
... ... @@ -101,6 +104,8 @@ Ext.define('amdaPlotComp.PlotStandardForm', {
101 104 listeners: {
102 105 change: function(combo, newValue, oldValue, eOpts) {
103 106 this.object.set(name, newValue);
  107 + if (onChange != null)
  108 + onChange(name, newValue);
104 109 },
105 110 scope: this
106 111 }
... ...
js/app/views/PlotComponents/PlotTree.js
... ... @@ -49,7 +49,7 @@ Ext.define('amdaPlotComp.PlotTree', {
49 49 var pageNode = this.store.getRootNode().appendChild(new amdaPlotObj.PlotPageTreeNode({object : tabObject}));
50 50  
51 51 //Layout node
52   - pageNode.appendChild(new amdaPlotObj.PlotLayoutTreeNode());
  52 + pageNode.appendChild(new amdaPlotObj.PlotLayoutTreeNode({object : tabObject}));
53 53  
54 54 //Panels node
55 55 this.panelsNode = pageNode.appendChild(new amdaPlotObj.PlotPanelsTreeNode());
... ... @@ -119,7 +119,9 @@ Ext.define('amdaPlotComp.PlotTree', {
119 119 this.getView().refresh();
120 120 },
121 121  
122   - buildPanelParamsNode: function(panelObject, selectedParamId = '') {
  122 + buildPanelParamsNode: function(panelObject, selectedParamId) {
  123 + selectedParamId = (typeof selectedParamId !== 'undefined') ? selectedParamId : '';
  124 +
123 125 var paramsNode = null;
124 126  
125 127 var me = this;
... ...