@@ -82,7 +82,6 @@ describe('@gl Test cone autorange:', function() {
8282 it ( 'should add pad around cone position to make sure they fit on the scene' , function ( done ) {
8383 var fig = Lib . extendDeep ( { } , require ( '@mocks/gl3d_cone-autorange.json' ) ) ;
8484
85- // the resulting image should be independent of what I multiply by here
8685 function makeScaleFn ( s ) {
8786 return function ( v ) { return v * s ; } ;
8887 }
@@ -92,6 +91,7 @@ describe('@gl Test cone autorange:', function() {
9291 [ - 0.66 , 4.66 ] , [ - 0.66 , 4.66 ] , [ - 0.66 , 4.66 ]
9392 ) ;
9493
94+ // the resulting image should be independent of what I multiply by here
9595 var trace = fig . data [ 0 ] ;
9696 var m = makeScaleFn ( 10 ) ;
9797 var u = trace . u . map ( m ) ;
@@ -105,6 +105,7 @@ describe('@gl Test cone autorange:', function() {
105105 [ - 0.66 , 4.66 ] , [ - 0.66 , 4.66 ] , [ - 0.66 , 4.66 ]
106106 ) ;
107107
108+ // the resulting image should be independent of what I multiply by here
108109 var trace = fig . data [ 0 ] ;
109110 var m = makeScaleFn ( 0.2 ) ;
110111 var u = trace . u . map ( m ) ;
@@ -166,6 +167,21 @@ describe('@gl Test cone autorange:', function() {
166167 _assertAxisRanges ( 'with sizemode absolute' ,
167168 [ 0.63 , 5.37 ] , [ 0.63 , 5.37 ] , [ 0.63 , 5.37 ]
168169 ) ;
170+
171+ var trace = fig . data [ 0 ] ;
172+ var m = makeScaleFn ( 2 ) ;
173+ var x = trace . x . map ( m ) ;
174+ var y = trace . y . map ( m ) ;
175+ var z = trace . z . map ( m ) ;
176+
177+ return Plotly . restyle ( gd , {
178+ x : [ x ] , y : [ y ] , z : [ z ]
179+ } ) ;
180+ } )
181+ . then ( function ( ) {
182+ _assertAxisRanges ( 'after spacing out the x/y/z coordinates' ,
183+ [ 1.25 , 10.75 ] , [ 1.25 , 10.75 ] , [ 1.25 , 10.75 ]
184+ ) ;
169185 } )
170186 . catch ( failTest )
171187 . then ( done ) ;
0 commit comments