@@ -74,9 +74,9 @@ describe('@gl Test cone autorange:', function() {
7474
7575 function _assertAxisRanges ( msg , xrng , yrng , zrng ) {
7676 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 ) ;
8080 }
8181
8282 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() {
8989
9090 Plotly . plot ( gd , fig ) . then ( function ( ) {
9191 _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 ]
9393 ) ;
9494
9595 var trace = fig . data [ 0 ] ;
@@ -102,7 +102,7 @@ describe('@gl Test cone autorange:', function() {
102102 } )
103103 . then ( function ( ) {
104104 _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 ]
106106 ) ;
107107
108108 var trace = fig . data [ 0 ] ;
@@ -115,7 +115,7 @@ describe('@gl Test cone autorange:', function() {
115115 } )
116116 . then ( function ( ) {
117117 _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 ]
119119 ) ;
120120
121121 var trace = fig . data [ 0 ] ;
@@ -140,21 +140,21 @@ describe('@gl Test cone autorange:', function() {
140140 } )
141141 . then ( function ( ) {
142142 _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 ]
144144 ) ;
145145
146146 return Plotly . restyle ( gd , 'sizeref' , 10 ) ;
147147 } )
148148 . then ( function ( ) {
149149 _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 ]
151151 ) ;
152152
153153 return Plotly . restyle ( gd , 'sizeref' , 0.1 ) ;
154154 } )
155155 . then ( function ( ) {
156156 _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 ]
158158 ) ;
159159
160160 return Plotly . restyle ( gd , {
@@ -164,7 +164,7 @@ describe('@gl Test cone autorange:', function() {
164164 } )
165165 . then ( function ( ) {
166166 _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 ]
168168 ) ;
169169 } )
170170 . catch ( failTest )
0 commit comments