Skip to content

Commit

Permalink
fix: white structure when max act is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
etowahadams committed Oct 30, 2024
1 parent 41b84ca commit 8ac15d4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions viz/src/components/MolstarMulti.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ const MolstarMulti: React.FC<MolstarViewerProps> = ({ proteins }) => {
},
coloring: {
getColor(e) {
const color = redColorMapRGB(activationList[e], maxValue);
const color = maxValue > 0 ? redColorMapRGB(activationList[e], maxValue) : [255, 255, 255];
return activationList[e] !== undefined
? Color.fromRgb(color[0], color[1], color[2])
: Color.fromRgb(255, 255, 255);
},
defaultColor: Color(0x777777),
},
getLabel(e) {
return e === 0 ? "Odd stripe" : "Even stripe";
getLabel() {
return "Activation colors";
},
});
};
Expand Down

0 comments on commit 8ac15d4

Please sign in to comment.