File tree 2 files changed +11
-4
lines changed
2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -483,7 +483,7 @@ proto.updateFancy = function(options) {
483
483
xaxis = scene . xaxis ,
484
484
yaxis = scene . yaxis ,
485
485
bounds = this . bounds ,
486
- sel = this . selectedIds ;
486
+ selection = options . selection ;
487
487
488
488
// makeCalcdata runs d2c (data-to-coordinate) on every point
489
489
var x = this . pickXData = xaxis . makeCalcdata ( options , 'x' ) . slice ( ) ;
@@ -544,7 +544,14 @@ proto.updateFancy = function(options) {
544
544
this . updateError ( 'X' , options , positions , errorsX ) ;
545
545
this . updateError ( 'Y' , options , positions , errorsY ) ;
546
546
547
- var sizes ;
547
+ var sizes , selIds ;
548
+
549
+ if ( selection ) {
550
+ selIds = { } ;
551
+ for ( i = 0 ; i < selection . length ; i ++ ) {
552
+ selIds [ selection [ i ] . id ] = true ;
553
+ }
554
+ }
548
555
549
556
if ( this . hasMarkers ) {
550
557
this . scatter . options . positions = positions ;
@@ -579,7 +586,7 @@ proto.updateFancy = function(options) {
579
586
580
587
for ( j = 0 ; j < 4 ; ++ j ) {
581
588
var color = colors [ 4 * index + j ] ;
582
- if ( sel && ! sel [ index ] && j === 3 ) {
589
+ if ( selIds && ! selIds [ index ] && j === 3 ) {
583
590
color *= DESELECTDIM ;
584
591
}
585
592
this . scatter . options . colors [ 4 * i + j ] = color ;
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ module.exports = function selectPoints(searchInfo, polygon) {
42
42
y = ya . c2p ( di . y ) ;
43
43
if ( polygon . contains ( [ x , y ] ) ) {
44
44
selection . push ( {
45
- // pointNumber : i,
45
+ id : i ,
46
46
x : di . x ,
47
47
y : di . y
48
48
} ) ;
You can’t perform that action at this time.
0 commit comments