File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 99
1010'use strict' ;
1111
12- var hasMarkers = require ( './subtypes' ) . hasMarkers ;
12+ var subtypes = require ( './subtypes' ) ;
1313
1414var DESELECTDIM = 0.2 ;
1515
@@ -26,7 +26,8 @@ module.exports = function selectPoints(searchInfo, polygon) {
2626 x ,
2727 y ;
2828
29- if ( ! hasMarkers ( trace ) ) return ; // TODO: include text and/or lines?
29+ // TODO: include lines? that would require per-segment line properties
30+ if ( ! subtypes . hasMarkers ( trace ) && ! subtypes . hasText ( trace ) ) return ;
3031
3132 var opacity = Array . isArray ( marker . opacity ) ? 1 : marker . opacity ;
3233
@@ -58,6 +59,10 @@ module.exports = function selectPoints(searchInfo, polygon) {
5859 . style ( 'opacity' , function ( d ) {
5960 return ( ( d . mo + 1 || opacity + 1 ) - 1 ) * ( d . dim ? DESELECTDIM : 1 ) ;
6061 } ) ;
62+ cd [ 0 ] . node3 . selectAll ( 'text' )
63+ . style ( 'opacity' , function ( d ) {
64+ return d . dim ? DESELECTDIM : 1 ;
65+ } ) ;
6166
6267 return selection ;
6368} ;
You can’t perform that action at this time.
0 commit comments