feat: graph header on gain panel
This commit is contained in:
@@ -117,7 +117,7 @@ function buildCurvesForChannels<T extends string>(
|
||||
): Curve[] {
|
||||
const curves: Curve[] = [];
|
||||
|
||||
channels.forEach((channel) => {
|
||||
[...channels].reverse().forEach((channel) => {
|
||||
if (!selected.has(channel)) return;
|
||||
const { geq, peqCrossover, total } = getCurves(channel);
|
||||
const color = colors[channel];
|
||||
@@ -292,9 +292,10 @@ function ChannelSelector<T extends string>({
|
||||
className={`magnitude-selector__chip${isOn ? ' active' : ''}`}
|
||||
style={{ '--chip-color': colors[channel] } as React.CSSProperties}
|
||||
onClick={() => onToggle(channel)}
|
||||
title={labels[channel]}
|
||||
>
|
||||
<span className="magnitude-selector__swatch" />
|
||||
{labels[channel]}
|
||||
<span className="magnitude-selector__label">{labels[channel]}</span>
|
||||
</button>
|
||||
);
|
||||
})}
|
||||
@@ -427,14 +428,16 @@ function GainSection({
|
||||
<div className="gain-linear-graph-section">
|
||||
<div className="gain-graph-panel">
|
||||
<div className="gain-graph-title-row">
|
||||
<div className="gain-graph-title">Input Response</div>
|
||||
<Button
|
||||
variant="toggle"
|
||||
className={showInputStages ? 'active' : ''}
|
||||
onClick={() => setShowInputStages((v) => !v)}
|
||||
>
|
||||
Show stages
|
||||
</Button>
|
||||
<div className="gain-graph-title-line">
|
||||
<div className="gain-graph-title">Input Response</div>
|
||||
<Button
|
||||
variant={showInputStages ? 'outline' : 'ghost'}
|
||||
className="gain-stages-toggle"
|
||||
onClick={() => setShowInputStages((v) => !v)}
|
||||
>
|
||||
Show stages
|
||||
</Button>
|
||||
</div>
|
||||
<ChannelSelector
|
||||
channels={INPUT_ORDER}
|
||||
labels={inputLabels}
|
||||
@@ -471,14 +474,17 @@ function GainSection({
|
||||
|
||||
<div className="gain-graph-panel">
|
||||
<div className="gain-graph-title-row">
|
||||
<div className="gain-graph-title">Output Response</div>
|
||||
<Button
|
||||
variant="toggle"
|
||||
className={showOutputStages ? 'active' : ''}
|
||||
onClick={() => setShowOutputStages((v) => !v)}
|
||||
>
|
||||
Show stages
|
||||
</Button>
|
||||
<div className="gain-graph-title-line">
|
||||
<div className="gain-graph-title">Output Response</div>
|
||||
<Button
|
||||
variant={showOutputStages ? 'outline' : 'ghost'}
|
||||
className="gain-stages-toggle"
|
||||
onClick={() => setShowOutputStages((v) => !v)}
|
||||
>
|
||||
Show stages
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<ChannelSelector
|
||||
channels={OUTPUT_ORDER}
|
||||
labels={outputLabels}
|
||||
|
||||
Reference in New Issue
Block a user