Blame view

js/app/views/PlotComponents/PlotLegendTextForm.js 1020 Bytes
339866c4   Benjamin Renard   Add text legend d...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/**
 * Project   : AMDA-NG
 * Name      : PlotLegendTextForm.js
 * @class   amdaPlotComp.PlotLegendTextForm
 * @extends amdaPlotComp.PlotStandardForm
 * @brief   Form to define specifics Text legend options
 * @author  Benjamin Renard
 * @version $Id: PlotLegendTextForm.js benjamin $
 */

Ext.define('amdaPlotComp.PlotLegendTextForm', {
	extend: 'amdaPlotComp.PlotStandardForm',
	
	setObject : function(object) {
		this.object = object;
		if (this.object != null)
			this.loadRecord(this.object);
	},
	
	getFormItems: function() {
dbb7bcbe   Benjamin Renard   Add curves defint...
21
22
		var me = this;
		
339866c4   Benjamin Renard   Add text legend d...
23
24
25
		return [
		        this.addStandardText('legend-text-value', 'Text'),
		        this.addStandardColor('legend-text-color', 'Color', amdaPlotObj.PlotObjectConfig.availableColors),
dbb7bcbe   Benjamin Renard   Add curves defint...
26
27
28
		        this.addStandardCombo('legend-text-position', 'Position', amdaPlotObj.PlotObjectConfig.availableLegendTextPositions, function(name, value, oldValue) {
		        	me.crtTree.getView().refresh();
		        }),
339866c4   Benjamin Renard   Add text legend d...
29
30
31
32
		        this.addStandardFont('legend-text-font')
        ];
	}
});