@@ -13,9 +13,9 @@ var Color = require('../../components/color');
13
13
var Drawing = require ( '../../components/drawing' ) ;
14
14
var Colorscale = require ( '../../components/colorscale' ) ;
15
15
16
- module . exports = function style ( gd , calcTrace ) {
16
+ function style ( gd , calcTrace ) {
17
17
if ( calcTrace ) styleTrace ( gd , calcTrace ) ;
18
- } ;
18
+ }
19
19
20
20
function styleTrace ( gd , calcTrace ) {
21
21
var trace = calcTrace [ 0 ] . trace ;
@@ -40,5 +40,21 @@ function styleTrace(gd, calcTrace) {
40
40
. style ( 'opacity' , marker . opacity ) ;
41
41
} ) ;
42
42
43
- Drawing . selectedPointStyle ( locs , trace ) ;
43
+ Drawing . selectedPointStyle ( locs , trace , gd ) ;
44
44
}
45
+
46
+ function styleOnSelect ( gd , calcTrace ) {
47
+ var s = calcTrace [ 0 ] . node3 ;
48
+ var trace = calcTrace [ 0 ] . trace ;
49
+
50
+ if ( trace . selectedpoints ) {
51
+ Drawing . selectedPointStyle ( s . selectAll ( '.choroplethlocation' ) , trace , gd ) ;
52
+ } else {
53
+ styleTrace ( gd , calcTrace ) ;
54
+ }
55
+ }
56
+
57
+ module . exports = {
58
+ style : style ,
59
+ styleOnSelect : styleOnSelect
60
+ } ;
0 commit comments