@@ -243,6 +243,10 @@ describe('scattermapbox calc', function() {
243243describe ( 'scattermapbox convert' , function ( ) {
244244 'use strict' ;
245245
246+ beforeAll ( function ( ) {
247+ jasmine . addMatchers ( customMatchers ) ;
248+ } ) ;
249+
246250 function _convert ( trace ) {
247251 var gd = { data : [ trace ] } ;
248252
@@ -397,6 +401,23 @@ describe('scattermapbox convert', function() {
397401 } ) ;
398402 } ) ;
399403
404+ it ( 'for markers + circle bubbles traces with repeated values, should' , function ( ) {
405+ var opts = _convert ( Lib . extendFlat ( { } , base , {
406+ lon : [ '-96.796988' , '-81.379236' , '-85.311819' , '' ] ,
407+ lat : [ '32.776664' , '28.538335' , '35.047157' , '' ] ,
408+ marker : { size : [ '5' , '49' , '5' , '' ] }
409+ } ) ) ;
410+
411+ expect ( opts . circle . paint [ 'circle-radius' ] . stops )
412+ . toBeCloseTo2DArray ( [ [ 0 , 2.5 ] , [ 1 , 24.5 ] ] , 'not replicate stops' ) ;
413+
414+ var radii = opts . circle . geojson . features . map ( function ( f ) {
415+ return f . properties [ 'circle-radius' ] ;
416+ } ) ;
417+
418+ expect ( radii ) . toBeCloseToArray ( [ 0 , 1 , 0 ] , 'link features to correct stops' ) ;
419+ } ) ;
420+
400421 function assertVisibility ( opts , expectations ) {
401422 var actual = [ 'fill' , 'line' , 'circle' , 'symbol' ] . map ( function ( l ) {
402423 return opts [ l ] . layout . visibility ;
0 commit comments