Change score importance controls to left-right sliders
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { useState } from "react";
|
||||
import type { LayoutScore, ScoreKey } from "../scoring";
|
||||
import type { ScoreWeights } from "../types";
|
||||
import { Wheel } from "./Wheel";
|
||||
|
||||
export interface OverlayToggles {
|
||||
loading: boolean;
|
||||
@@ -66,13 +65,22 @@ export function ScorePanel({ result, overall, weights, overlays, onWeight, onTog
|
||||
</div>
|
||||
<div style={{ ...small, fontSize: 11 }}>{v === null ? "n/a" : `${Math.round(v * 100)}%`}</div>
|
||||
</div>
|
||||
<div style={{ width: 50, flexShrink: 0 }} title="Priority 0-10">
|
||||
<Wheel value={weights[k]} min={0} max={10} rows={1} onChange={(n) => onWeight(k, n)} />
|
||||
<div style={{ width: 80, flexShrink: 0, display: "flex", alignItems: "center", gap: 4 }} title="Priority 0-10">
|
||||
<input
|
||||
type="range"
|
||||
min={0}
|
||||
max={10}
|
||||
step={1}
|
||||
value={weights[k]}
|
||||
onChange={(e) => onWeight(k, Number(e.target.value))}
|
||||
style={{ flex: 1, cursor: "pointer" }}
|
||||
/>
|
||||
<span style={{ ...small, minWidth: 16, textAlign: "right", fontSize: 11 }}>{weights[k]}</span>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
<div style={{ ...small, fontSize: 11 }}>Right-hand wheels set each score's priority (0-10).</div>
|
||||
<div style={{ ...small, fontSize: 11 }}>Left-right sliders set each score's priority (0-10).</div>
|
||||
|
||||
{required.length > 0 && (
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user