@@ -243,6 +243,10 @@ describe('scattermapbox calc', function() {
243
243
describe ( 'scattermapbox convert' , function ( ) {
244
244
'use strict' ;
245
245
246
+ beforeAll ( function ( ) {
247
+ jasmine . addMatchers ( customMatchers ) ;
248
+ } ) ;
249
+
246
250
function _convert ( trace ) {
247
251
var gd = { data : [ trace ] } ;
248
252
@@ -397,6 +401,23 @@ describe('scattermapbox convert', function() {
397
401
} ) ;
398
402
} ) ;
399
403
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
+
400
421
function assertVisibility ( opts , expectations ) {
401
422
var actual = [ 'fill' , 'line' , 'circle' , 'symbol' ] . map ( function ( l ) {
402
423
return opts [ l ] . layout . visibility ;
0 commit comments