Skip to content

Commit

Permalink
fix(getShiftedOpacityFromPreset): fix inverted opacity value
Browse files Browse the repository at this point in the history
The opacity should be increased when the points are shifted up and decreased
when shifted down.
  • Loading branch information
bnmajor committed Nov 7, 2023
1 parent 5d371b1 commit c601192
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/vtk-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export function getShiftedOpacityFromPreset(

const [xmin, xmax] = effectiveRange;
const width = xmax - xmin;
return points.map(([x, y]) => [(x - xmin) / width + shift, y + shiftAlpha]);
return points.map(([x, y]) => [(x - xmin) / width + shift, y - shiftAlpha]);
}
return null;
}
Expand Down

0 comments on commit c601192

Please sign in to comment.