@@ -391,7 +391,7 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition
391
391
}
392
392
393
393
function makePoints ( d ) {
394
- var join , selection ;
394
+ var join , selection , hasNode ;
395
395
396
396
var trace = d [ 0 ] . trace ,
397
397
s = d3 . select ( this ) ,
@@ -433,11 +433,14 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition
433
433
join . each ( function ( d ) {
434
434
var el = d3 . select ( this ) ;
435
435
var sel = transition ( el ) ;
436
- Drawing . translatePoint ( d , sel , xa , ya ) ;
437
- Drawing . singlePointStyle ( d , sel , trace , markerScale , lineScale , gd ) ;
436
+ hasNode = Drawing . translatePoint ( d , sel , xa , ya ) ;
438
437
439
- if ( trace . customdata ) {
440
- el . classed ( 'plotly-customdata' , d . data !== null && d . data !== undefined ) ;
438
+ if ( hasNode ) {
439
+ Drawing . singlePointStyle ( d , sel , trace , markerScale , lineScale , gd ) ;
440
+
441
+ if ( trace . customdata ) {
442
+ el . classed ( 'plotly-customdata' , d . data !== null && d . data !== undefined ) ;
443
+ }
441
444
}
442
445
} ) ;
443
446
@@ -460,8 +463,8 @@ function plotOne(gd, idx, plotinfo, cdscatter, cdscatterAll, element, transition
460
463
join . each ( function ( d ) {
461
464
var g = d3 . select ( this ) ;
462
465
var sel = transition ( g . select ( 'text' ) ) ;
463
- var hasTextPt = Drawing . translatePoint ( d , sel , xa , ya ) ;
464
- if ( ! hasTextPt ) g . remove ( ) ;
466
+ hasNode = Drawing . translatePoint ( d , sel , xa , ya ) ;
467
+ if ( ! hasNode ) g . remove ( ) ;
465
468
} ) ;
466
469
467
470
join . selectAll ( 'text' )
0 commit comments