Skip to content

Commit d58a37f

Browse files
committed
Use trace.uid rather than hanging on to the entire trace just for the lastPickResults
(cherry picked from commit a2efeb4)
1 parent 0447a19 commit d58a37f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/plots/gl2d/scene2d.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -483,13 +483,13 @@ proto.draw = function() {
483483

484484
if(nextSelection && (
485485
!this.lastPickResult ||
486-
this.lastPickResult.trace !== nextSelection.trace ||
486+
this.lastPickResult.traceUid !== nextSelection.trace.uid ||
487487
this.lastPickResult.dataCoord[0] !== nextSelection.dataCoord[0] ||
488488
this.lastPickResult.dataCoord[1] !== nextSelection.dataCoord[1])
489489
) {
490490
var selection = nextSelection;
491491
this.lastPickResult = {
492-
trace: nextSelection.trace, // could we just retain/compare the trace uid?
492+
traceUid: nextSelection.trace ? nextSelection.trace.uid : null,
493493
dataCoord: nextSelection.dataCoord.slice()
494494
};
495495
this.spikes.update({ center: result.dataCoord });

0 commit comments

Comments
 (0)