Skip to content

Commit

Permalink
improve scaling box
Browse files Browse the repository at this point in the history
  • Loading branch information
korbinian90 committed Oct 3, 2024
1 parent c2106b8 commit c4a6ead
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions niivue/src/components/ScalingBox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,8 @@ export const ScalingBox = (props: any) => {
>
Invert
</button>
<br />
<button
class="bg-gray-600 border-2 border-gray-600 rounded-md w-16"
class="bg-gray-600 border-2 border-gray-600 rounded-md w-16 float-right"
onclick=${() => (overlayMenu.value = false)}
>
Close
Expand Down Expand Up @@ -121,7 +120,9 @@ export const Scaling = ({ setScaling, init }: ScalingProps) => {
class="border-2 border-gray-600 rounded-md bg-gray-700 h-6 w-20"
type="number"
ref=${minRef}
onchange=${update}
onkeydown=${(e: any) => {
if (e.key === 'Enter') update()
}}
/>
</label>
<label class="items-baseline h-6 px-2">
Expand All @@ -130,9 +131,14 @@ export const Scaling = ({ setScaling, init }: ScalingProps) => {
class="border-2 border-gray-600 rounded-md bg-gray-700 h-6 w-20"
type="number"
ref=${maxRef}
onchange=${update}
onkeydown=${(e: any) => {
if (e.key === 'Enter') update()
}}
/>
</label>
<button class="bg-gray-600 border-2 border-gray-600 rounded-md w-16" onclick=${update}>
Apply
</button>
</div>
`
}
Expand Down

0 comments on commit c4a6ead

Please sign in to comment.