Blame view

js/app/views/PlotComponents/PlotSerieForm.js 2.04 KB
17433635   Benjamin Renard   Add series and sp...
1
2
3
4
/**
 * Project   : AMDA-NG
 * Name      : PlotSerieForm.js
 * @class   amdaPlotComp.PlotSerieForm
a0bf9157   Benjamin Renard   Add tick plot and...
5
 * @extends amdaPlotComp.PlotStandardForm
17433635   Benjamin Renard   Add series and sp...
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
 * @brief   Form to define specifics serie options
 * @author  Benjamin Renard
 * @version $Id: PlotSerieForm.js benjamin $
 */

Ext.define('amdaPlotComp.PlotSerieForm', {
	extend: 'amdaPlotComp.PlotStandardForm',
	
	setObject : function(object) {
		this.object = object.get('param-drawing-object');
		this.loadRecord(this.object);
		this.updateOptions(this.crtTree.getSelectedPlotType());
	},
	
	updateOptions: function(plotType) {
		var xParamField = this.getForm().findField('serie-xaxis-param');
003ba315   Benjamin Renard   Add Epoch Plot an...
22
		var resamplingModeField = this.getForm().findField('serie-resampling-mode');
17433635   Benjamin Renard   Add series and sp...
23
24
		var isScatter = (plotType == 'xyPlot');
		xParamField.setVisible(isScatter);
003ba315   Benjamin Renard   Add Epoch Plot an...
25
		resamplingModeField.setVisible(isScatter);
17433635   Benjamin Renard   Add series and sp...
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
	},
	
	getFormItems: function() {
		var linesItems = [
	    	this.addStandardCombo('serie-lines-style', 'Style', amdaPlotObj.PlotObjectConfig.availableLinesStyles),
	    	this.addStandardFloat('serie-lines-width', 'Width', 1, 10),
	    	this.addStandardColor('serie-lines-color', 'Color', amdaPlotObj.PlotObjectConfig.availableColors)
		];
		
		var symbolsItems = [
		    this.addStandardCombo('serie-symbols-type', 'Type', amdaPlotObj.PlotObjectConfig.availableSymbolsTypes),
		    this.addStandardFloat('serie-symbols-size', 'Size', 1, 10),
		    this.addStandardColor('serie-symbols-color', 'Color', amdaPlotObj.PlotObjectConfig.availableColors)
        ];
		
		return [
		    this.addStandardParamDropTarget('serie-xaxis-param', 'X Parameter'),
003ba315   Benjamin Renard   Add Epoch Plot an...
43
		    this.addStandardCombo('serie-resampling-mode', 'Reference parameter for resampling', amdaPlotObj.PlotObjectConfig.availableResamplingModes),
17433635   Benjamin Renard   Add series and sp...
44
45
46
47
48
49
50
		    this.addStandardCombo('serie-yaxis', 'Y axis', amdaPlotObj.PlotObjectConfig.availableYAxes),
		    this.addStandardParamDropTarget('serie-colored-param', 'Colored Parameter'),
		    this.addStandardFieldSet('Lines', 'serie-lines-activated', linesItems),
		    this.addStandardFieldSet('Symbols', 'serie-symbols-activated', symbolsItems)
		];
	}
});