Browse Source

fix: restore easing curve polyline overlay in ControlPanel bezier editor

The easingCurve prop (showing the actual easing function curve over the
bezier editor) was present in the old node-body editor but wasn't carried
over to the ControlPanel's EaseCurveControls.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
handoff-20260429-1057
shrimbly 4 months ago
parent
commit
7da69cda96
  1. 6
      src/components/nodes/ControlPanel.tsx

6
src/components/nodes/ControlPanel.tsx

@ -824,6 +824,11 @@ function EaseCurveControls({ node }: { node: Node }) {
[node.id, updateNodeData]
);
const editorEasingCurve = useMemo(() => {
if (!nodeData.easingPreset) return undefined;
return generateEasingPolyline(nodeData.easingPreset, 100, 100, 50);
}, [nodeData.easingPreset]);
const presetThumbnails = useMemo(() => {
return ALL_EASING_NAMES.map((name) => ({
name,
@ -849,6 +854,7 @@ function EaseCurveControls({ node }: { node: Node }) {
value={nodeData.bezierHandles || [0.42, 0, 0.58, 1]}
onChange={handleBezierChange}
onCommit={handleBezierChange}
easingCurve={editorEasingCurve}
/>
{nodeData.easingPreset && (
<div className="text-xs text-neutral-400 mt-1">

Loading…
Cancel
Save