feat(visualizer): improve chart interactions

- Rename Drift → Trade in UI\n- Dynamic price precision for low prices\n- Fib retracement: select + move in X+Y\n- Ctrl+wheel vertical zoom, Ctrl+drag vertical pan\n- Auto Scale toggle for price scale
This commit is contained in:
u1
2026-01-06 17:46:33 +01:00
parent e20a1f5198
commit 6107c4e0ef
5 changed files with 345 additions and 32 deletions

View File

@@ -16,16 +16,15 @@ type Props = {
active?: NavId;
onSelect?: (id: NavId) => void;
rightSlot?: ReactNode;
rightEndSlot?: ReactNode;
};
export default function TopNav({ active = 'trade', onSelect, rightSlot, rightEndSlot }: Props) {
export default function TopNav({ active = 'trade', onSelect, rightSlot }: Props) {
return (
<header className="topNav">
<div className="topNav__left">
<div className="topNav__brand" aria-label="Drift">
<div className="topNav__brand" aria-label="Trade">
<div className="topNav__brandMark" aria-hidden="true" />
<div className="topNav__brandName">Drift</div>
<div className="topNav__brandName">Trade</div>
</div>
<nav className="topNav__menu" aria-label="Primary">
{navItems.map((it) => (
@@ -56,7 +55,6 @@ export default function TopNav({ active = 'trade', onSelect, rightSlot, rightEnd
</div>
</>
)}
{rightEndSlot}
</div>
</header>
);