File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 9
9
10
10
'use strict' ;
11
11
12
- var hasMarkers = require ( './subtypes' ) . hasMarkers ;
12
+ var subtypes = require ( './subtypes' ) ;
13
13
14
14
var DESELECTDIM = 0.2 ;
15
15
@@ -26,7 +26,8 @@ module.exports = function selectPoints(searchInfo, polygon) {
26
26
x ,
27
27
y ;
28
28
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 ;
30
31
31
32
var opacity = Array . isArray ( marker . opacity ) ? 1 : marker . opacity ;
32
33
@@ -58,6 +59,10 @@ module.exports = function selectPoints(searchInfo, polygon) {
58
59
. style ( 'opacity' , function ( d ) {
59
60
return ( ( d . mo + 1 || opacity + 1 ) - 1 ) * ( d . dim ? DESELECTDIM : 1 ) ;
60
61
} ) ;
62
+ cd [ 0 ] . node3 . selectAll ( 'text' )
63
+ . style ( 'opacity' , function ( d ) {
64
+ return d . dim ? DESELECTDIM : 1 ;
65
+ } ) ;
61
66
62
67
return selection ;
63
68
} ;
You can’t perform that action at this time.
0 commit comments