Commit f8dfaec8be3a595d973e3712d44fe3b01501afc7
1 parent
a3ed599f
Exists in
master
and in
101 other branches
rm_6954 in progress
Showing
3 changed files
with
36 additions
and
16 deletions
Show diff stats
js/app/models/PlotObjects/PlotAxisObject.js
... | ... | @@ -26,13 +26,15 @@ Ext.define('amdaPlotObj.PlotAxisObject', { |
26 | 26 | //axis-type can be : time, y-left, y-right, x, color, epoch |
27 | 27 | {name: 'axis-type', type: 'string'}, |
28 | 28 | {name: 'axis-reverse', type: 'boolean'}, |
29 | - {name: 'axis-scale', type: 'string'}, | |
29 | + {name: 'axis-scale', type: 'string'}, | |
30 | 30 | {name: 'axis-range-min', type: 'float'}, |
31 | 31 | {name: 'axis-range-max', type: 'float'}, |
32 | 32 | {name: 'axis-range-extend', type: 'boolean'}, |
33 | 33 | {name: 'axis-color', type: 'string'}, |
34 | 34 | {name: 'axis-thickness', type: 'int'}, |
35 | 35 | {name: 'axis-tick-showmarks', type: 'boolean'}, |
36 | + {name: 'axis-grid-spicify-ticks-number', type: 'boolean'}, | |
37 | + {name: 'axis-grid-spicify-ticks-spacing', type: 'boolean'}, | |
36 | 38 | {name: 'axis-tick-position', type: 'string'}, |
37 | 39 | {name: 'axis-grid-minor', type: 'boolean'}, |
38 | 40 | {name: 'axis-grid-major', type: 'boolean'}, |
... | ... | @@ -43,19 +45,19 @@ Ext.define('amdaPlotObj.PlotAxisObject', { |
43 | 45 | {name: 'axis-legend-activated', type: 'boolean'}, |
44 | 46 | {name: 'axis-legend-text', type: 'string'}, |
45 | 47 | {name: 'axis-legend-color', type: 'string'}, |
46 | - {name: 'axis-legend-font-activated', type: 'boolean'}, | |
47 | - {name: 'axis-legend-font-name', type: 'string'}, | |
48 | - {name: 'axis-legend-font-size', type: 'int'}, | |
49 | - {name: 'axis-legend-font-bold', type: 'boolean'}, | |
50 | - {name: 'axis-legend-font-italic', type: 'boolean'}, | |
51 | - //only used for time axis | |
52 | - {name: 'axis-time-format', type: 'string'}, | |
53 | - //only used for epoch axis | |
54 | - {name: 'axis-epoch-normalized', type: 'boolean'}, | |
55 | - //only used for color axis | |
56 | - {name: 'axis-color-map', type: 'string'}, | |
57 | - {name: 'axis-color-minval', type: 'string'}, | |
58 | - {name: 'axis-color-maxval', type: 'string'} | |
48 | + {name: 'axis-legend-font-activated', type: 'boolean'}, | |
49 | + {name: 'axis-legend-font-name', type: 'string'}, | |
50 | + {name: 'axis-legend-font-size', type: 'int'}, | |
51 | + {name: 'axis-legend-font-bold', type: 'boolean'}, | |
52 | + {name: 'axis-legend-font-italic', type: 'boolean'}, | |
53 | + //only used for time axis | |
54 | + {name: 'axis-time-format', type: 'string'}, | |
55 | + //only used for epoch axis | |
56 | + {name: 'axis-epoch-normalized', type: 'boolean'}, | |
57 | + //only used for color axis | |
58 | + {name: 'axis-color-map', type: 'string'}, | |
59 | + {name: 'axis-color-minval', type: 'string'}, | |
60 | + {name: 'axis-color-maxval', type: 'string'} | |
59 | 61 | ], |
60 | 62 | |
61 | 63 | associations : [ |
... | ... | @@ -98,6 +100,8 @@ Ext.define('amdaPlotObj.PlotAxisObject', { |
98 | 100 | this.set('axis-grid-minor-space',0); |
99 | 101 | this.set('axis-grid-major-space',0); |
100 | 102 | this.set('axis-grid-minor', false); |
103 | + this.set('axis-grid-spicify-ticks-number', false); | |
104 | + this.set('axis-grid-spicify-ticks-spacing', false); | |
101 | 105 | this.set('axis-grid-major', false); |
102 | 106 | this.set('axis-legend-activated', true); |
103 | 107 | this.set('axis-legend-text', ''); |
... | ... |
js/app/views/PlotComponents/PlotBaseAxisForm.js
... | ... | @@ -34,10 +34,13 @@ Ext.define('amdaPlotComp.PlotBaseAxisForm', { |
34 | 34 | this.addStandardCheck('axis-tick-showmarks', 'Show tick marks'), |
35 | 35 | this.addStandardCheck('axis-grid-major', 'Show major grid'), |
36 | 36 | this.addStandardCheck('axis-grid-minor', 'Show minor grid'), |
37 | + this.addStandardCheck('axis-grid-spicify-ticks-number', 'spicify ticks number'), | |
37 | 38 | this.addStandardInteger('axis-grid-major-number', 'Nb of Major Ticks', 0, Number.MAX_VALUE,true), |
38 | 39 | this.addStandardInteger('axis-grid-minor-number', 'Nb of Minor Ticks', 0, Number.MAX_VALUE,true), |
40 | + this.addStandardCheck('axis-grid-spicify-ticks-spacing', 'spicify ticks spacing'), | |
41 | + this.addStandardFloat2('axis-grid-major-space', ' Major Ticks Space', 0, Number.MAX_VALUE,true), | |
39 | 42 | this.addStandardFloat2('axis-grid-minor-space', ' Minor Ticks Space', 0, Number.MAX_VALUE,true), |
40 | - this.addStandardFloat2('axis-grid-major-space', ' Major Ticks Space', 0, Number.MAX_VALUE,true) | |
43 | + | |
41 | 44 | ]; |
42 | 45 | |
43 | 46 | var axisItems = []; |
... | ... |
js/app/views/PlotComponents/PlotStandardForm.js
... | ... | @@ -21,6 +21,8 @@ Ext.define('amdaPlotComp.PlotStandardForm', { |
21 | 21 | |
22 | 22 | //Link to the tree |
23 | 23 | crtTree: null, |
24 | + desableTickNumber:true, | |
25 | + desableTickSpacing:true, | |
24 | 26 | |
25 | 27 | constructor: function(config) { |
26 | 28 | this.init(config); |
... | ... | @@ -85,6 +87,7 @@ Ext.define('amdaPlotComp.PlotStandardForm', { |
85 | 87 | allowBlank = (typeof allowBlank !== 'undefined') ? allowBlank : false; |
86 | 88 | |
87 | 89 | return { |
90 | + id:name, | |
88 | 91 | xtype: 'numberfield', |
89 | 92 | name: name, |
90 | 93 | fieldLabel: label, |
... | ... | @@ -104,14 +107,16 @@ Ext.define('amdaPlotComp.PlotStandardForm', { |
104 | 107 | }; |
105 | 108 | }, |
106 | 109 | |
107 | - addStandardFloat2: function(name, label, min, max, allowBlank, onChange) { | |
110 | + addStandardFloat2: function(name, label, min, max, allowBlank, onChange,disable) { | |
108 | 111 | allowBlank = (typeof allowBlank !== 'undefined') ? allowBlank : false; |
109 | 112 | |
110 | 113 | return { |
114 | + id:name, | |
111 | 115 | xtype: 'textfield', |
112 | 116 | name: name, |
113 | 117 | fieldLabel: label, |
114 | 118 | regex : /[-+]?(?:\d*\.?\d+|\d+\.?\d*)(?:[eE][-+]?\d+)?/, |
119 | + disable:disable, | |
115 | 120 | validator: function (val) { |
116 | 121 | var errMsg = null; |
117 | 122 | if (!allowBlank && Ext.isEmpty(val)) { |
... | ... | @@ -170,9 +175,17 @@ Ext.define('amdaPlotComp.PlotStandardForm', { |
170 | 175 | boxLabel: label, |
171 | 176 | listeners: { |
172 | 177 | change: function(combo, newValue, oldValue, eOpts) { |
178 | + | |
173 | 179 | this.object.set(name, newValue); |
174 | 180 | if (onChange != null) |
175 | 181 | onChange(name, newValue, oldValue); |
182 | + if(name=='axis-grid-spicify-ticks-number'){ | |
183 | + console.log(tyopeof(this)); | |
184 | + }else if(name=='axis-grid-spicify-ticks-spacing'){ | |
185 | + this.desableTickSpacing=! this.desableTickSpacing; | |
186 | + console.log( this.getDockedComponent('axis-grid-spicify-ticks-spacing')); | |
187 | + console.log( this.getDockedComponent(1)); | |
188 | + } | |
176 | 189 | }, |
177 | 190 | scope: this |
178 | 191 | } |
... | ... |