Commit 42e982bf9a12008f6d54cfcf1e14aed90b91a384
1 parent
001b0710
Exists in
master
and in
101 other branches
us 6954 ok
Showing
4 changed files
with
16 additions
and
17 deletions
Show diff stats
js/app/models/PlotObjects/PlotAxisObject.js
... | ... | @@ -95,8 +95,8 @@ Ext.define('amdaPlotObj.PlotAxisObject', { |
95 | 95 | this.set('axis-thickness', amdaPlotObj.PlotObjectConfig.defaultValues.axis.thickness); |
96 | 96 | this.set('axis-tick-showmarks', true); |
97 | 97 | this.set('axis-tick-position', amdaPlotObj.PlotObjectConfig.defaultValues.axis.tickPosition); |
98 | - this.set('axis-grid-minor-number',0); | |
99 | - this.set('axis-grid-major-number',0); | |
98 | + this.set('axis-grid-minor-number',1); | |
99 | + this.set('axis-grid-major-number',1); | |
100 | 100 | this.set('axis-grid-minor-space',0); |
101 | 101 | this.set('axis-grid-major-space',0); |
102 | 102 | this.set('axis-grid-minor', false); |
... | ... |
js/app/views/PlotComponents/PlotBaseAxisForm.js
... | ... | @@ -15,8 +15,7 @@ Ext.define('amdaPlotComp.PlotBaseAxisForm', { |
15 | 15 | showColorOption : true, |
16 | 16 | showRangeOptions : true, |
17 | 17 | showTickGridOptions : true, |
18 | - disableTicksSpacing : true, | |
19 | - disableTicksNumbers : true, | |
18 | + showTicksNumberSpacing : true, | |
20 | 19 | |
21 | 20 | getFormItems: function() { |
22 | 21 | var me = this; |
... | ... | @@ -32,7 +31,6 @@ Ext.define('amdaPlotComp.PlotBaseAxisForm', { |
32 | 31 | this.addStandardFont('axis-legend-font') |
33 | 32 | ]; |
34 | 33 | var manageTicksNumber = function (name, newValue, oldValue){ |
35 | - var disableTicksNumbers = me.getForm( ).findField('axis-grid-minor-number').disabled | |
36 | 34 | me.getForm( ).findField('axis-grid-minor-number').setDisabled( !newValue); |
37 | 35 | me.getForm( ).findField('axis-grid-major-number').setDisabled( !newValue); |
38 | 36 | if( newValue){ |
... | ... | @@ -42,29 +40,28 @@ Ext.define('amdaPlotComp.PlotBaseAxisForm', { |
42 | 40 | } |
43 | 41 | }; |
44 | 42 | var manageTicksSpacing = function (name, newValue, oldValue){ |
45 | - var disableTicksSacing = me.getForm( ).findField('axis-grid-minor-space').disabled | |
46 | 43 | me.getForm( ).findField('axis-grid-minor-space').setDisabled( !newValue ); |
47 | 44 | me.getForm( ).findField('axis-grid-major-space').setDisabled( !newValue ); |
48 | 45 | if( newValue ){ |
49 | 46 | me.getForm( ).findField('axis-grid-minor-number').setDisabled(newValue); |
50 | 47 | me.getForm( ).findField('axis-grid-major-number').setDisabled(newValue); |
51 | - me.getForm( ).findField('axis-grid-specify-ticks-number').setValue(!newValuee); | |
48 | + me.getForm( ).findField('axis-grid-specify-ticks-number').setValue(!newValue); | |
52 | 49 | } |
53 | 50 | }; |
54 | 51 | var tickGridItems = [ |
55 | 52 | this.addStandardCombo('axis-tick-position', 'Ticks position', amdaPlotObj.PlotObjectConfig.availableTicksPositions), |
56 | 53 | this.addStandardCheck('axis-tick-showmarks', 'Show tick marks'), |
57 | 54 | this.addStandardCheck('axis-grid-major', 'Show major grid'), |
58 | - this.addStandardCheck('axis-grid-minor', 'Show minor grid'), | |
59 | - this.addStandardCheck('axis-grid-specify-ticks-number', 'Specify ticks number', manageTicksNumber), | |
60 | - this.addStandardInteger('axis-grid-major-number', 'Nb of Major Ticks', 0, Number.MAX_VALUE,true,true), | |
61 | - this.addStandardInteger('axis-grid-minor-number', 'Nb of Minor Ticks', 0, Number.MAX_VALUE,true,true), | |
62 | - this.addStandardCheck('axis-grid-specify-ticks-spacing', 'Specify ticks spacing',manageTicksSpacing), | |
63 | - this.addStandardFloat2('axis-grid-major-space', ' Major Ticks Space', 0, Number.MAX_VALUE,true,true), | |
64 | - this.addStandardFloat2('axis-grid-minor-space', ' Minor Ticks Space', 0, Number.MAX_VALUE,true,true), | |
65 | - | |
66 | - ]; | |
67 | - | |
55 | + this.addStandardCheck('axis-grid-minor', 'Show minor grid')]; | |
56 | + if (this.showTicksNumberSpacing){ | |
57 | + tickGridItems.push(this.addStandardCheck('axis-grid-specify-ticks-number', 'Specify ticks number', manageTicksNumber)); | |
58 | + tickGridItems.push(this.addStandardInteger('axis-grid-major-number', 'Nb of Major Ticks', 1, Number.MAX_VALUE,true,true)); | |
59 | + tickGridItems.push(this.addStandardInteger('axis-grid-minor-number', 'Nb of Minor Ticks', 1, Number.MAX_VALUE,true,true)); | |
60 | + tickGridItems.push(this.addStandardCheck('axis-grid-specify-ticks-spacing', 'Specify ticks spacing',manageTicksSpacing)); | |
61 | + tickGridItems.push(this.addStandardFloat2('axis-grid-major-space', ' Major Ticks Space', 0, Number.MAX_VALUE,true,true)); | |
62 | + tickGridItems.push(this.addStandardFloat2('axis-grid-minor-space', ' Minor Ticks Space', 0, Number.MAX_VALUE,true,true)); | |
63 | + }; | |
64 | + | |
68 | 65 | var axisItems = []; |
69 | 66 | if (this.showScaleOption) |
70 | 67 | axisItems.push(this.addStandardCombo('axis-scale', 'Scale', amdaPlotObj.PlotObjectConfig.availableAxisScales)); |
... | ... |
js/app/views/PlotComponents/PlotEpochAxisForm.js
js/app/views/PlotComponents/PlotTimeAxisForm.js