Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better ROISet margin setting. Less resource intensive. #1919

Merged
merged 4 commits into from
Nov 27, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
gradient color scale issue
  • Loading branch information
jrobinso committed Nov 26, 2024
commit 036de3d3edbc4dc8f51e6ee7a9b947649d815d2c
10 changes: 8 additions & 2 deletions js/util/colorScale.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,15 @@ class BinnedColorScale {


class GradientColorScale {
constructor({min, max, minColor, maxColor}) {
constructor(config) {
this.type = 'gradient'
this.setProperties({min, max, minColor, maxColor})
const fixed = {
min: config.min !== undefined ? config.min : config.low,
max: config.max !== undefined ? config.max : config.high,
minColor: config.minColor || config.lowColor,
maxColor: config.maxColor || config.highColor
}
this.setProperties(fixed)
}

setProperties({min, max, minColor, maxColor}) {
Expand Down