@@ -25,16 +25,13 @@ function AxesOptions() {
25
25
this . tickFont = [ 'sans-serif' , 'sans-serif' , 'sans-serif' ] ;
26
26
this . tickSize = [ 12 , 12 , 12 ] ;
27
27
this . tickAngle = [ 0 , 0 , 0 ] ;
28
- this . tickAlign = [ 'auto' , 'auto' , 'auto' ] ;
29
28
this . tickColor = [ [ 0 , 0 , 0 , 1 ] , [ 0 , 0 , 0 , 1 ] , [ 0 , 0 , 0 , 1 ] ] ;
30
29
this . tickPad = [ 18 , 18 , 18 ] ;
31
30
32
31
this . labels = [ 'x' , 'y' , 'z' ] ;
33
32
this . labelEnable = [ true , true , true ] ;
34
33
this . labelFont = [ 'Open Sans' , 'Open Sans' , 'Open Sans' ] ;
35
34
this . labelSize = [ 20 , 20 , 20 ] ;
36
- this . labelAngle = [ 0 , 0 , 0 ] ;
37
- this . labelAlign = [ 'auto' , 'auto' , 'auto' ] ;
38
35
this . labelColor = [ [ 0 , 0 , 0 , 1 ] , [ 0 , 0 , 0 , 1 ] , [ 0 , 0 , 0 , 1 ] ] ;
39
36
this . labelPad = [ 30 , 30 , 30 ] ;
40
37
@@ -93,18 +90,6 @@ proto.merge = function(sceneLayout) {
93
90
if ( axes . titlefont . family ) opts . labelFont [ i ] = axes . titlefont . family ;
94
91
if ( axes . titlefont . size ) opts . labelSize [ i ] = axes . titlefont . size ;
95
92
}
96
- // Title rotation/alignment similar to ticks
97
- if ( 'titleangle' in axes ) {
98
- if ( axes . titleangle === 'auto' ) {
99
- opts . labelAlign [ i ] = 'auto' ;
100
- opts . labelAngle [ i ] = 0 ;
101
- } else {
102
- opts . labelAlign [ i ] = - 1 ;
103
- opts . labelAngle [ i ] = Math . PI * - axes . labelangle / 180 ;
104
- }
105
- }
106
- if ( axes . titlealign === 'auto' ) opts . labelAlign [ i ] = 'auto' ;
107
- if ( 'titlealign' in axes ) opts . lableAlign [ i ] = axes . titlealign ;
108
93
109
94
// Lines
110
95
if ( 'showline' in axes ) opts . lineEnable [ i ] = axes . showline ;
@@ -132,16 +117,10 @@ proto.merge = function(sceneLayout) {
132
117
if ( 'tickcolor' in axes ) opts . lineTickColor [ i ] = str2RgbaArray ( axes . tickcolor ) ;
133
118
if ( 'tickwidth' in axes ) opts . lineTickWidth [ i ] = axes . tickwidth ;
134
119
if ( 'tickangle' in axes ) {
135
- if ( axes . tickangle === 'auto' ) {
136
- opts . tickAlign [ i ] = 'auto' ;
137
- opts . tickAngle [ i ] = 0 ;
138
- } else {
139
- opts . tickAlign [ i ] = - 1 ;
140
- opts . tickAngle [ i ] = Math . PI * - axes . tickangle / 180 ;
141
- }
120
+ opts . tickAngle [ i ] = ( axes . tickangle === 'auto' ) ?
121
+ - 3600 : // i.e. special number to set auto option
122
+ Math . PI * - axes . tickangle / 180 ;
142
123
}
143
- if ( axes . tickalign === 'auto' ) opts . tickAlign [ i ] = 'auto' ;
144
- if ( 'tickalign' in axes ) opts . tickAlign [ i ] = axes . tickalign ;
145
124
146
125
// tick labels
147
126
if ( 'showticklabels' in axes ) opts . tickEnable [ i ] = axes . showticklabels ;
0 commit comments