Skip to content

Commit

Permalink
Only hilite points from map if axis agrees
Browse files Browse the repository at this point in the history
When processing a message from NGCHM to highlight points, verify
the axis of those points agrees with the axis of the plot.
  • Loading branch information
marohrdanz committed Jun 8, 2020
1 parent 7e47f8f commit d24019f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ngchm.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ VAN.addMessageListener ('plot', function plotMessageHandler (vanodi) {
});

VAN.addMessageListener ('makeHiLite', function hiliteMessageHandler (vanodi) {
if (canvasPlot.axis && canvasPlot.axis.toLowerCase() != vanodi.data.axis.toLowerCase()) {
return false
}
canvasPlot.clearSelectedPoints();
canvasPlot.clearLassoCanvas();
// From vanodi message, get the data points to select on the scatter plot
Expand Down

0 comments on commit d24019f

Please sign in to comment.