File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
Expand file tree Collapse file tree 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) {
483483 xaxis = scene . xaxis ,
484484 yaxis = scene . yaxis ,
485485 bounds = this . bounds ,
486- sel = this . selectedIds ;
486+ selection = options . selection ;
487487
488488 // makeCalcdata runs d2c (data-to-coordinate) on every point
489489 var x = this . pickXData = xaxis . makeCalcdata ( options , 'x' ) . slice ( ) ;
@@ -544,7 +544,14 @@ proto.updateFancy = function(options) {
544544 this . updateError ( 'X' , options , positions , errorsX ) ;
545545 this . updateError ( 'Y' , options , positions , errorsY ) ;
546546
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+ }
548555
549556 if ( this . hasMarkers ) {
550557 this . scatter . options . positions = positions ;
@@ -579,7 +586,7 @@ proto.updateFancy = function(options) {
579586
580587 for ( j = 0 ; j < 4 ; ++ j ) {
581588 var color = colors [ 4 * index + j ] ;
582- if ( sel && ! sel [ index ] && j === 3 ) {
589+ if ( selIds && ! selIds [ index ] && j === 3 ) {
583590 color *= DESELECTDIM ;
584591 }
585592 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) {
4242 y = ya . c2p ( di . y ) ;
4343 if ( polygon . contains ( [ x , y ] ) ) {
4444 selection . push ( {
45- // pointNumber : i,
45+ id : i ,
4646 x : di . x ,
4747 y : di . y
4848 } ) ;
You can’t perform that action at this time.
0 commit comments