Skip to content

Commit

Permalink
Tweak indicators to stay witin the sliders
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbradley committed Nov 22, 2023
1 parent 6c1ceac commit e6ac939
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions andromeda-ui/components/WeightSlider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ export default function WeightSlider({ id, weights, highlight, onChange }: Weigh
const value = weights[id];
let highlightDiv = null;
if (highlight !== undefined) {
const hintPosition = highlight * SLIDER_WIDTH;
highlightDiv = <div className="absolute top-1 inline w-1 bg-blue-500 h-3" style={{"left": hintPosition + "px"}}>
const hintPosition = highlight * (SLIDER_WIDTH - 4);
highlightDiv = <div className="absolute left-2 top-1 inline w-1 bg-cyan-600 h-3" style={{"left": hintPosition + "px"}}>
&nbsp;
</div>;
}
Expand Down

0 comments on commit e6ac939

Please sign in to comment.