@@ -95,11 +95,17 @@ describe('Test quiver defaults', function() {
9595 expect ( gd . _fullData [ 0 ] . v ) . toEqual ( [ 0 , 0 , 0 ] ) ;
9696 } ) ;
9797
98- it ( 'should set sizemode and sizeref defaults correctly' , function ( ) {
98+ it ( 'should set lengthmode and lengthfactor defaults correctly' , function ( ) {
9999 gd = makeGD ( ) ;
100100 supplyAllDefaults ( gd ) ;
101- expect ( gd . _fullData [ 0 ] . sizemode ) . toBe ( 'scaled' ) ;
102- expect ( gd . _fullData [ 0 ] . sizeref ) . toBe ( 1 ) ;
101+ expect ( gd . _fullData [ 0 ] . lengthmode ) . toBe ( 'scaled' ) ;
102+ expect ( gd . _fullData [ 0 ] . lengthfactor ) . toBe ( 1 ) ;
103+ } ) ;
104+
105+ it ( 'should set uvref default to data' , function ( ) {
106+ gd = makeGD ( ) ;
107+ supplyAllDefaults ( gd ) ;
108+ expect ( gd . _fullData [ 0 ] . uvref ) . toBe ( 'data' ) ;
103109 } ) ;
104110
105111 it ( 'should set anchor default to tail' , function ( ) {
@@ -220,13 +226,13 @@ describe('Test quiver interactions', function() {
220226 y : [ 1 , 2 ] ,
221227 u : [ 1 , 0 ] ,
222228 v : [ 0 , 1 ] ,
223- sizeref : 0.5
229+ lengthfactor : 0.5
224230 } ] ) . then ( function ( ) {
225- expect ( gd . _fullData [ 0 ] . sizeref ) . toBe ( 0.5 ) ;
226- return Plotly . restyle ( gd , 'sizeref ' , 1.5 ) ;
231+ expect ( gd . _fullData [ 0 ] . lengthfactor ) . toBe ( 0.5 ) ;
232+ return Plotly . restyle ( gd , 'lengthfactor ' , 1.5 ) ;
227233 } )
228234 . then ( function ( ) {
229- expect ( gd . _fullData [ 0 ] . sizeref ) . toBe ( 1.5 ) ;
235+ expect ( gd . _fullData [ 0 ] . lengthfactor ) . toBe ( 1.5 ) ;
230236 return Plotly . restyle ( gd , 'anchor' , 'tip' ) ;
231237 } )
232238 . then ( function ( ) {
@@ -293,25 +299,25 @@ describe('Test quiver interactions', function() {
293299 . then ( done , done . fail ) ;
294300 } ) ;
295301
296- it ( 'should handle sizemode changes' , function ( done ) {
302+ it ( 'should handle lengthmode changes' , function ( done ) {
297303 Plotly . newPlot ( gd , [ {
298304 type : 'quiver' ,
299305 x : [ 0 , 1 , 2 ] ,
300306 y : [ 0 , 1 , 2 ] ,
301307 u : [ 1 , 2 , 3 ] ,
302308 v : [ 1 , 2 , 3 ] ,
303- sizemode : 'scaled' ,
304- sizeref : 0.5
309+ lengthmode : 'scaled' ,
310+ lengthfactor : 0.5
305311 } ] ) . then ( function ( ) {
306- expect ( gd . _fullData [ 0 ] . sizemode ) . toBe ( 'scaled' ) ;
307- return Plotly . restyle ( gd , 'sizemode ' , 'raw' ) ;
312+ expect ( gd . _fullData [ 0 ] . lengthmode ) . toBe ( 'scaled' ) ;
313+ return Plotly . restyle ( gd , 'lengthmode ' , 'raw' ) ;
308314 } )
309315 . then ( function ( ) {
310- expect ( gd . _fullData [ 0 ] . sizemode ) . toBe ( 'raw' ) ;
311- return Plotly . restyle ( gd , 'sizemode ' , 'scaled' ) ;
316+ expect ( gd . _fullData [ 0 ] . lengthmode ) . toBe ( 'raw' ) ;
317+ return Plotly . restyle ( gd , 'lengthmode ' , 'scaled' ) ;
312318 } )
313319 . then ( function ( ) {
314- expect ( gd . _fullData [ 0 ] . sizemode ) . toBe ( 'scaled' ) ;
320+ expect ( gd . _fullData [ 0 ] . lengthmode ) . toBe ( 'scaled' ) ;
315321 } )
316322 . then ( done , done . fail ) ;
317323 } ) ;
0 commit comments