@@ -74,9 +74,9 @@ describe('@gl Test cone autorange:', function() {
74
74
75
75
function _assertAxisRanges ( msg , xrng , yrng , zrng ) {
76
76
var sceneLayout = gd . _fullLayout . scene ;
77
- expect ( sceneLayout . xaxis . range ) . toBeCloseToArray ( xrng , 2 , 'xaxis range -' + msg ) ;
78
- expect ( sceneLayout . yaxis . range ) . toBeCloseToArray ( yrng , 2 , 'yaxis range -' + msg ) ;
79
- expect ( sceneLayout . zaxis . range ) . toBeCloseToArray ( zrng , 2 , 'zaxis range -' + msg ) ;
77
+ expect ( sceneLayout . xaxis . range ) . toBeCloseToArray ( xrng , 2 , 'xaxis range - ' + msg ) ;
78
+ expect ( sceneLayout . yaxis . range ) . toBeCloseToArray ( yrng , 2 , 'yaxis range - ' + msg ) ;
79
+ expect ( sceneLayout . zaxis . range ) . toBeCloseToArray ( zrng , 2 , 'zaxis range - ' + msg ) ;
80
80
}
81
81
82
82
it ( 'should add pad around cone position to make sure they fit on the scene' , function ( done ) {
@@ -89,7 +89,7 @@ describe('@gl Test cone autorange:', function() {
89
89
90
90
Plotly . plot ( gd , fig ) . then ( function ( ) {
91
91
_assertAxisRanges ( 'base' ,
92
- [ - 0.39 , 4.39 ] , [ - 0.39 , 4.39 ] , [ - 0.39 , 4.39 ]
92
+ [ - 0.66 , 4.66 ] , [ - 0.66 , 4.66 ] , [ - 0.66 , 4.66 ]
93
93
) ;
94
94
95
95
var trace = fig . data [ 0 ] ;
@@ -102,7 +102,7 @@ describe('@gl Test cone autorange:', function() {
102
102
} )
103
103
. then ( function ( ) {
104
104
_assertAxisRanges ( 'scaled up' ,
105
- [ - 0.39 , 4.39 ] , [ - 0.39 , 4.39 ] , [ - 0.39 , 4.39 ]
105
+ [ - 0.66 , 4.66 ] , [ - 0.66 , 4.66 ] , [ - 0.66 , 4.66 ]
106
106
) ;
107
107
108
108
var trace = fig . data [ 0 ] ;
@@ -115,7 +115,7 @@ describe('@gl Test cone autorange:', function() {
115
115
} )
116
116
. then ( function ( ) {
117
117
_assertAxisRanges ( 'scaled down' ,
118
- [ - 0.39 , 4.39 ] , [ - 0.39 , 4.39 ] , [ - 0.39 , 4.39 ]
118
+ [ - 0.66 , 4.66 ] , [ - 0.66 , 4.66 ] , [ - 0.66 , 4.66 ]
119
119
) ;
120
120
121
121
var trace = fig . data [ 0 ] ;
@@ -140,21 +140,21 @@ describe('@gl Test cone autorange:', function() {
140
140
} )
141
141
. then ( function ( ) {
142
142
_assertAxisRanges ( 'after adding one cone outside range but with norm-0' ,
143
- [ - 0.45 , 6.45 ] , [ - 0.45 , 6.45 ] , [ - 0.45 , 6.45 ]
143
+ [ - 0.72 , 6.72 ] , [ - 0.72 , 6.72 ] , [ - 0.72 , 6.72 ]
144
144
) ;
145
145
146
146
return Plotly . restyle ( gd , 'sizeref' , 10 ) ;
147
147
} )
148
148
. then ( function ( ) {
149
149
_assertAxisRanges ( 'after increasing sizeref' ,
150
- [ - 12.4 , 18.4 ] , [ - 12.4 , 18.4 ] , [ - 12.4 , 18.4 ]
150
+ [ - 15.06 , 21.06 ] , [ - 15.06 , 21.06 ] , [ - 15.06 , 21.06 ]
151
151
) ;
152
152
153
153
return Plotly . restyle ( gd , 'sizeref' , 0.1 ) ;
154
154
} )
155
155
. then ( function ( ) {
156
156
_assertAxisRanges ( 'after decreasing sizeref' ,
157
- [ 0.74 , 5.26 ] , [ 0.74 , 5.26 ] , [ 0.74 , 5.26 ]
157
+ [ 0.72 , 5.28 ] , [ 0.72 , 5.28 ] , [ 0.72 , 5.28 ]
158
158
) ;
159
159
160
160
return Plotly . restyle ( gd , {
@@ -164,7 +164,7 @@ describe('@gl Test cone autorange:', function() {
164
164
} )
165
165
. then ( function ( ) {
166
166
_assertAxisRanges ( 'with sizemode absolute' ,
167
- [ - 1.25 , 7.25 ] , [ - 1.25 , 7.25 ] , [ - 1.25 , 7.25 ]
167
+ [ - 2.31 , 8.31 ] , [ - 2.31 , 8.31 ] , [ - 2.31 , 8.31 ]
168
168
) ;
169
169
} )
170
170
. catch ( failTest )
0 commit comments