Commit 29f02ab88c785a58eebe5ad7d999b226ab4fd082

Authored by Benjamin Renard
1 parent 06ae16cb

Add layout property to draw time axes only for the lower time plot (#5493)

js/app/models/PlotObjects/PlotLayoutAutoObject.js
... ... @@ -23,7 +23,8 @@ Ext.define('amdaPlotObj.PlotLayoutAutoObject', {
23 23 fields : [
24 24 {name: 'layout-panel-height', type: 'float', defaultValue: amdaPlotObj.PlotObjectConfig.defaultValues.page.layout.panelHeight},
25 25 {name: 'layout-panel-spacing', type: 'float', defaultValue: amdaPlotObj.PlotObjectConfig.defaultValues.page.layout.panelSpacing},
26   - {name: 'layout-expand', type: 'boolean', defaultValue: amdaPlotObj.PlotObjectConfig.defaultValues.page.layout.expand}
  26 + {name: 'layout-expand', type: 'boolean', defaultValue: amdaPlotObj.PlotObjectConfig.defaultValues.page.layout.expand},
  27 + {name: 'layout-timeaxes-legend-lowerone', type: 'boolean', defaultValue: amdaPlotObj.PlotObjectConfig.defaultValues.page.layout.timeAxesLegend}
27 28 ],
28 29  
29 30 getJsonValues : function()
... ... @@ -33,7 +34,8 @@ Ext.define('amdaPlotObj.PlotLayoutAutoObject', {
33 34 layoutValues['layout-panel-height'] = this.get('layout-panel-height');
34 35 layoutValues['layout-panel-spacing'] = this.get('layout-panel-spacing');
35 36 layoutValues['layout-expand'] = this.get('layout-expand');
  37 + layoutValues['layout-timeaxes-legend-lowerone'] = this.get('layout-timeaxes-legend-lowerone');
36 38  
37 39 return layoutValues;
38 40 }
39   -});
40 41 \ No newline at end of file
  42 +});
... ...
js/app/models/PlotObjects/PlotLayoutVerticalObject.js
... ... @@ -24,6 +24,7 @@ Ext.define('amdaPlotObj.PlotLayoutVerticalObject', {
24 24 {name: 'layout-panel-height', type: 'float', defaultValue: amdaPlotObj.PlotObjectConfig.defaultValues.page.layout.panelHeight},
25 25 {name: 'layout-panel-spacing', type: 'float', defaultValue: amdaPlotObj.PlotObjectConfig.defaultValues.page.layout.panelSpacing},
26 26 {name: 'layout-expand', type: 'boolean', defaultValue: amdaPlotObj.PlotObjectConfig.defaultValues.page.layout.expand},
  27 + {name: 'layout-timeaxes-legend-lowerone', type: 'boolean', defaultValue: amdaPlotObj.PlotObjectConfig.defaultValues.page.layout.timeAxesLegend},
27 28 //{name: 'layout-timeplot-width', type: 'float', useNull:true},
28 29 {name: 'layout-timeplot-height', type: 'float', useNull:true},
29 30 {name: 'layout-xyplot-width', type: 'float', useNull:true},
... ... @@ -37,6 +38,7 @@ Ext.define('amdaPlotObj.PlotLayoutVerticalObject', {
37 38 layoutValues['layout-panel-height'] = this.get('layout-panel-height');
38 39 layoutValues['layout-panel-spacing'] = this.get('layout-panel-spacing');
39 40 layoutValues['layout-expand'] = this.get('layout-expand');
  41 + layoutValues['layout-timeaxes-legend-lowerone'] = this.get('layout-timeaxes-legend-lowerone');
40 42 //layoutValues['layout-timeplot-width'] = this.get('layout-timeplot-width') ? this.get('layout-timeplot-width') : -1;
41 43 layoutValues['layout-timeplot-height'] = this.get('layout-timeplot-height') ? this.get('layout-timeplot-height') : -1;
42 44 layoutValues['layout-xyplot-width'] = this.get('layout-xyplot-width') ? this.get('layout-xyplot-width') : -1;
... ... @@ -44,4 +46,4 @@ Ext.define('amdaPlotObj.PlotLayoutVerticalObject', {
44 46  
45 47 return layoutValues;
46 48 }
47   -});
48 49 \ No newline at end of file
  50 +});
... ...
js/app/views/PlotComponents/PlotLayoutAutoForm.js
... ... @@ -17,10 +17,15 @@ Ext.define('amdaPlotComp.PlotLayoutAutoForm', {
17 17 },
18 18  
19 19 getFormItems: function() {
  20 + var legendTimeAxesVisibilityItems = [
  21 + this.addStandardCheck('layout-timeaxes-legend-lowerone', 'Only for the lower one')
  22 + ];
  23 +
20 24 return [
21 25 this.addStandardFloat('layout-panel-height', 'Panels height', 0, 1),
22 26 this.addStandardFloat('layout-panel-spacing', 'Panels spacing', 0, 1),
23   - this.addStandardCheck('layout-expand', 'Expand panels')
  27 + this.addStandardCheck('layout-expand', 'Expand panels'),
  28 + this.addStandardFieldSet('Legend visibility for time axes', '', legendTimeAxesVisibilityItems)
24 29 ];
25 30 }
26   -});
27 31 \ No newline at end of file
  32 +});
... ...
js/app/views/PlotComponents/PlotLayoutVerticalForm.js
... ... @@ -26,13 +26,18 @@ Ext.define('amdaPlotComp.PlotLayoutVerticalForm', {
26 26 this.addStandardFloat('layout-xyplot-width', 'Panels width', 0, 1, true),
27 27 this.addStandardFloat('layout-xyplot-height', 'Panels height', 0, 1, true)
28 28 ];
  29 +
  30 + var legendTimeAxesVisibilityItems = [
  31 + this.addStandardCheck('layout-timeaxes-legend-lowerone', 'Only for the lower one')
  32 + ];
29 33  
30 34 return [
31 35 this.addStandardFloat('layout-panel-height', 'General Panels height', 0, 1),
32 36 this.addStandardFloat('layout-panel-spacing', 'Panels spacing', 0, 1),
33 37 this.addStandardCheck('layout-expand', 'Expand panels'),
  38 + this.addStandardFieldSet('Legend visibility for time axes', '', legendTimeAxesVisibilityItems),
34 39 this.addStandardFieldSet('Time / Epoch Panels Dimensions', '', timePlotDimItems),
35 40 this.addStandardFieldSet('Scatter / Instant Panels Dimensions', '', xyPlotDimItems)
36 41 ];
37 42 }
38   -});
39 43 \ No newline at end of file
  44 +});
... ...