Skip to content

Commit

Permalink
Merge pull request #1268 from broadinstitute/db-fix-colorscale-defaults
Browse files Browse the repository at this point in the history
fixing colorscale behavior when Reds are default (SCP-2945)
  • Loading branch information
devonbush committed Nov 18, 2021
2 parents 290f495 + 0f44114 commit 8829e83
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/javascript/components/visualization/ScatterPlot.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,9 @@ function getScatterDimensions(scatter, dimensionProps, genes) {

/** Reverse the continuous colorscale so high contrast color corresponds to high expression */
function shouldReverseScale(scatterColor) {
return scatterColor !== 'Reds'
// don't reverse the Reds scale, and check whether it is the default
const shownColor = scatterColor ? scatterColor : defaultScatterColor
return shownColor !== 'Reds'
}

/** get the array of plotly traces for plotting */
Expand Down

0 comments on commit 8829e83

Please sign in to comment.