@@ -101,6 +101,7 @@ describe('image supplyDefaults', function() {
101101 var tests = [
102102 [ 'rgb' , [ 0 , 0 , 0 ] , [ 255 , 255 , 255 ] ] ,
103103 [ 'rgba' , [ 0 , 0 , 0 , 0 ] , [ 255 , 255 , 255 , 1 ] ] ,
104+ [ 'rgba256' , [ 0 , 0 , 0 , 0 ] , [ 255 , 255 , 255 , 255 ] ] ,
104105 [ 'hsl' , [ 0 , 0 , 0 ] , [ 360 , 100 , 100 ] ] ,
105106 [ 'hsla' , [ 0 , 0 , 0 , 0 ] , [ 360 , 100 , 100 , 1 ] ]
106107 ] ;
@@ -140,13 +141,13 @@ describe('image supplyDefaults', function() {
140141 expect ( traceOut . zmax ) . toEqual ( [ 20 , 100 , 100 , 1 ] , 'zmax default' ) ;
141142 } ) ;
142143
143- it ( 'should set colormodel to rgba when source is defined' , function ( ) {
144+ it ( 'should set colormodel to rgba256 when source is defined' , function ( ) {
144145 traceIn = {
145146 type : 'image' ,
146147 source : 'data:image/png;base64,asdf'
147148 } ;
148149 supplyDefaults ( traceIn , traceOut ) ;
149- expect ( traceOut . colormodel ) . toBe ( 'rgba ' ) ;
150+ expect ( traceOut . colormodel ) . toBe ( 'rgba256 ' ) ;
150151 } ) ;
151152
152153 it ( 'should override zmin/zmax when source is defined' , function ( ) {
@@ -157,9 +158,9 @@ describe('image supplyDefaults', function() {
157158 zmax : 50
158159 } ;
159160 supplyDefaults ( traceIn , traceOut ) ;
160- expect ( traceOut . colormodel ) . toBe ( 'rgba ' ) ;
161+ expect ( traceOut . colormodel ) . toBe ( 'rgba256 ' ) ;
161162 expect ( traceOut . zmin ) . toEqual ( [ 0 , 0 , 0 , 0 ] ) ;
162- expect ( traceOut . zmax ) . toEqual ( [ 255 , 255 , 255 , 1 ] ) ;
163+ expect ( traceOut . zmax ) . toEqual ( [ 255 , 255 , 255 , 255 ] ) ;
163164 } ) ;
164165} ) ;
165166
@@ -543,7 +544,7 @@ describe('image hover:', function() {
543544 . then ( function ( ) { _hover ( 255 , 295 ) ; } )
544545 . then ( function ( ) {
545546 assertHoverLabelContent ( {
546- nums : 'x: 31.5\ny: 35.5\nz: [128, 77, 54, 254 ]\nRGBA: [128, 77, 54, 1]' ,
547+ nums : 'x: 31.5\ny: 35.5\nz: [128, 77, 54, 255 ]\nRGBA: [128, 77, 54, 1]' ,
547548 name : ''
548549 } ) ;
549550 } )
@@ -573,7 +574,7 @@ describe('image hover:', function() {
573574 . then ( function ( ) { _hover ( 255 , 295 ) ; } )
574575 . then ( function ( ) {
575576 assertHoverLabelContent ( {
576- nums : 'x: 31.5\ny: 35.5\nz: [128, 77, 54, 254 ]\nHSLA: [128°, 77%, 54%, 1]' ,
577+ nums : 'x: 31.5\ny: 35.5\nz: [128, 77, 54, 255 ]\nHSLA: [128°, 77%, 54%, 1]' ,
577578 name : ''
578579 } ) ;
579580 } )
0 commit comments