Skip to content

Commit

Permalink
feat: Update buttons on Niivue Display
Browse files Browse the repository at this point in the history
  • Loading branch information
PintoGideon committed Feb 20, 2025
1 parent a278a0c commit e2f3c85
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/components/Preview/displays/NiiVueDisplay.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

.controlBar {
position: absolute;
top: 0;
top: 1.5em;
right: 1.5em;
height: 8px;
}
14 changes: 9 additions & 5 deletions src/components/Preview/displays/NiiVueDisplay.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { SLICE_TYPE } from "@niivue/niivue";
import { Button } from "@patternfly/react-core";
import {
FreeSurferColorLUT,
type NVROptions,
Expand Down Expand Up @@ -74,15 +75,18 @@ const NiiVueDisplay: React.FC<NiiVueDisplayProps> = ({ selectedFile }) => {
) : (
<div className={styles.container}>
<div className={styles.controlBar}>
<button
type="button"
<Button
style={{
marginRight: "0.5em",
}}
variant="secondary"
onClick={() => setFreesurferLut(!freesurferLut)}
>
{freesurferLut ? "FreeSurfer" : "gray"}
</button>
<button type="button" onClick={rotateSliceType}>
</Button>
<Button variant="secondary" onClick={rotateSliceType}>
{sliceTypeName}
</button>
</Button>
{freesurferLut && <span>{crosshairText}</span>}
</div>
<SizedNiivueCanvas
Expand Down

0 comments on commit e2f3c85

Please sign in to comment.