Blame view

js/app/views/PlotComponents/PlotLegendTextForm.js 1.04 KB
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
		        this.addStandardCombo('legend-text-position', 'Position', amdaPlotObj.PlotObjectConfig.availableLegendTextPositions, function(name, value, oldValue) {
e84ed2cf   Benjamin Renard   Add Interval Tick...
27
28
		        	me.object.set('legend-text-position', value);
	        		me.crtTree.refresh();
dbb7bcbe   Benjamin Renard   Add curves defint...
29
		        }),
339866c4   Benjamin Renard   Add text legend d...
30
31
32
33
		        this.addStandardFont('legend-text-font')
        ];
	}
});