From 1276a10e9a574b8da74bbf44de6d783c290afaa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= Date: Sun, 1 Mar 2026 12:46:00 +0100 Subject: [PATCH] fix: keyframe timeline --- components/animate/AnimationEditor.tsx | 11 ++++++----- components/animate/KeyframeTimeline.tsx | 8 ++++---- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/components/animate/AnimationEditor.tsx b/components/animate/AnimationEditor.tsx index 69c4cb6..d8685cd 100644 --- a/components/animate/AnimationEditor.tsx +++ b/components/animate/AnimationEditor.tsx @@ -21,7 +21,7 @@ export function AnimationEditor() { ); const [previewElement, setPreviewElement] = useState('box'); const [mobileTab, setMobileTab] = useState('edit'); - const [rightTab, setRightTab] = useState('keyframes'); + const [rightTab, setRightTab] = useState('export'); const selectedKeyframe = config.keyframes.find((k) => k.id === selectedId) ?? null; @@ -108,6 +108,8 @@ export function AnimationEditor() {
+ +
@@ -123,7 +125,7 @@ export function AnimationEditor() {
{/* Tab switcher */}
- {(['keyframes', 'export', 'presets'] as RightTab[]).map((t) => ( + {(['export', 'presets'] as RightTab[]).map((t) => ( ))}
{/* Content */}
- {rightTab === 'keyframes' && } - {rightTab === 'export' && } + {rightTab === 'export' && } {rightTab === 'presets' && }
diff --git a/components/animate/KeyframeTimeline.tsx b/components/animate/KeyframeTimeline.tsx index d38840f..cfe0580 100644 --- a/components/animate/KeyframeTimeline.tsx +++ b/components/animate/KeyframeTimeline.tsx @@ -15,7 +15,7 @@ interface Props { embedded?: boolean; // when true, no glass card wrapper (use inside another card) } -const TICKS = [0, 25, 50, 75, 100]; +const TICKS = [25, 50, 75]; const iconBtn = (disabled?: boolean) => cn( @@ -85,14 +85,14 @@ export function KeyframeTimeline({ keyframes, selectedId, onSelect, onAdd, onDel {/* Track */}
{TICKS.map((tick) => (
@@ -118,7 +118,7 @@ export function KeyframeTimeline({ keyframes, selectedId, onSelect, onAdd, onDel
{/* Offset labels */} -
+
{sorted.map((kf) => (