Skip to content

Commit

Permalink
properly fixes sort issue: #131
Browse files Browse the repository at this point in the history
  • Loading branch information
jkanche committed Jul 23, 2022
1 parent 8c94afe commit e204cd8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ const App = () => {

if (customSelection !== null && Object.keys(customSelection).length > 0 && !initLoadState) {
let csLen = `cs${Object.keys(customSelection).length}`;
var cs = customSelection[csLen].sort((a, b) => { return a-b });
var cs = customSelection[csLen];
scranWorker.postMessage({
"type": "computeCustomMarkers",
"payload": {
Expand Down
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?.sort(); // AL: is this safe to do? Or should we copy first?
tmpSelection[`cs${cid + 1}`] = props?.selectedPoints?.sort((a, b) => { return a-b });
props?.setCustomSelection(tmpSelection);

props?.setSelectedPoints(null);
Expand Down

0 comments on commit e204cd8

Please sign in to comment.