@@ -82,7 +82,6 @@ describe('@gl Test cone autorange:', function() {
82
82
it ( 'should add pad around cone position to make sure they fit on the scene' , function ( done ) {
83
83
var fig = Lib . extendDeep ( { } , require ( '@mocks/gl3d_cone-autorange.json' ) ) ;
84
84
85
- // the resulting image should be independent of what I multiply by here
86
85
function makeScaleFn ( s ) {
87
86
return function ( v ) { return v * s ; } ;
88
87
}
@@ -92,6 +91,7 @@ describe('@gl Test cone autorange:', function() {
92
91
[ - 0.66 , 4.66 ] , [ - 0.66 , 4.66 ] , [ - 0.66 , 4.66 ]
93
92
) ;
94
93
94
+ // the resulting image should be independent of what I multiply by here
95
95
var trace = fig . data [ 0 ] ;
96
96
var m = makeScaleFn ( 10 ) ;
97
97
var u = trace . u . map ( m ) ;
@@ -105,6 +105,7 @@ describe('@gl Test cone autorange:', function() {
105
105
[ - 0.66 , 4.66 ] , [ - 0.66 , 4.66 ] , [ - 0.66 , 4.66 ]
106
106
) ;
107
107
108
+ // the resulting image should be independent of what I multiply by here
108
109
var trace = fig . data [ 0 ] ;
109
110
var m = makeScaleFn ( 0.2 ) ;
110
111
var u = trace . u . map ( m ) ;
@@ -166,6 +167,21 @@ describe('@gl Test cone autorange:', function() {
166
167
_assertAxisRanges ( 'with sizemode absolute' ,
167
168
[ 0.63 , 5.37 ] , [ 0.63 , 5.37 ] , [ 0.63 , 5.37 ]
168
169
) ;
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
+ ) ;
169
185
} )
170
186
. catch ( failTest )
171
187
. then ( done ) ;
0 commit comments