@@ -244,13 +244,12 @@ describe('scattermapbox convert', function() {
244244
245245 function _convert ( trace ) {
246246 var gd = { data : [ trace ] } ;
247-
248247 Plots . supplyDefaults ( gd ) ;
249248
250249 var fullTrace = gd . _fullData [ 0 ] ;
251- var calcTrace = ScatterMapbox . calc ( gd , fullTrace ) ;
252- calcTrace [ 0 ] . trace = fullTrace ;
250+ Plots . doCalcdata ( gd , fullTrace ) ;
253251
252+ var calcTrace = gd . calcdata [ 0 ] ;
254253 return convert ( calcTrace ) ;
255254 }
256255
@@ -353,9 +352,9 @@ describe('scattermapbox convert', function() {
353352
354353 assertVisibility ( opts , [ 'none' , 'visible' , 'none' , 'visible' ] ) ;
355354
356- var lineCoords = [ [
355+ var lineCoords = [
357356 [ 10 , 20 ] , [ 20 , 20 ] , [ 30 , 10 ] , [ 20 , 10 ] , [ 10 , 20 ]
358- ] ] ;
357+ ] ;
359358
360359 expect ( opts . line . geojson . coordinates ) . toEqual ( lineCoords , 'have correct line coords' ) ;
361360
@@ -413,6 +412,20 @@ describe('scattermapbox convert', function() {
413412 expect ( radii ) . toBeCloseToArray ( [ 0 , 1 , 0 ] , 'link features to correct stops' ) ;
414413 } ) ;
415414
415+ it ( 'for input only blank pts' , function ( ) {
416+ var opts = _convert ( Lib . extendFlat ( { } , base , {
417+ mode : 'lines' ,
418+ lon : [ '' , null ] ,
419+ lat : [ null , '' ] ,
420+ fill : 'toself'
421+ } ) ) ;
422+
423+ assertVisibility ( opts , [ 'none' , 'none' , 'none' , 'none' ] ) ;
424+
425+ expect ( opts . line . geojson . coordinates ) . toEqual ( [ ] , 'have correct line coords' ) ;
426+ expect ( opts . fill . geojson . coordinates ) . toEqual ( [ ] , 'have correct fill coords' ) ;
427+ } ) ;
428+
416429 function assertVisibility ( opts , expectations ) {
417430 var actual = [ 'fill' , 'line' , 'circle' , 'symbol' ] . map ( function ( l ) {
418431 return opts [ l ] . layout . visibility ;
0 commit comments