Skip to content

Commit

Permalink
Make sure custom selection indices are sorted, closes #131.
Browse files Browse the repository at this point in the history
  • Loading branch information
LTLA committed Jul 14, 2022
1 parent f6de7d4 commit 3a710f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Plots/DimPlot.js
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ const DimPlot = (props) => {

let cid = Object.keys(props?.customSelection).length;
let tmpSelection = { ...props?.customSelection };
tmpSelection[`cs${cid + 1}`] = props?.selectedPoints;
tmpSelection[`cs${cid + 1}`] = props?.selectedPoints?.sort(); // AL: is this safe to do? Or should we copy first?
props?.setCustomSelection(tmpSelection);

props?.setSelectedPoints(null);
Expand Down

0 comments on commit 3a710f7

Please sign in to comment.