@@ -51,7 +51,6 @@ function Scene2D(options, fullLayout) {
51
51
52
52
// trace set
53
53
this . traces = { } ;
54
- this . _inputs = { } ;
55
54
56
55
// create axes spikes
57
56
this . spikes = createSpikes ( this . glplot ) ;
@@ -362,7 +361,6 @@ proto.destroy = function() {
362
361
this . container . removeChild ( this . mouseContainer ) ;
363
362
364
363
this . fullData = null ;
365
- this . _inputs = null ;
366
364
this . glplot = null ;
367
365
this . stopped = true ;
368
366
} ;
@@ -487,7 +485,6 @@ proto.updateTraces = function(fullData, calcData) {
487
485
// update / create trace objects
488
486
for ( i = 0 ; i < fullData . length ; i ++ ) {
489
487
fullTrace = fullData [ i ] ;
490
- this . _inputs [ fullTrace . uid ] = i ;
491
488
var calcTrace = calcData [ i ] ,
492
489
traceObj = this . traces [ fullTrace . uid ] ;
493
490
@@ -500,16 +497,22 @@ proto.updateTraces = function(fullData, calcData) {
500
497
} ;
501
498
502
499
proto . emitPointAction = function ( nextSelection , eventType ) {
500
+ var uid = nextSelection . trace . uid ;
501
+ var trace ;
503
502
504
- var curveIndex = this . _inputs [ nextSelection . trace . uid ] ;
503
+ for ( var i = 0 ; i < this . fullData . length ; i ++ ) {
504
+ if ( this . fullData [ i ] . uid === uid ) {
505
+ trace = this . fullData [ i ] ;
506
+ }
507
+ }
505
508
506
509
this . graphDiv . emit ( eventType , {
507
510
points : [ {
508
511
x : nextSelection . traceCoord [ 0 ] ,
509
512
y : nextSelection . traceCoord [ 1 ] ,
510
- curveNumber : curveIndex ,
513
+ curveNumber : trace . index ,
511
514
pointNumber : nextSelection . pointIndex ,
512
- data : this . fullData [ curveIndex ] . _input ,
515
+ data : trace . _input ,
513
516
fullData : this . fullData ,
514
517
xaxis : this . xaxis ,
515
518
yaxis : this . yaxis
0 commit comments