fix: keyframe timeline
This commit is contained in:
@@ -21,7 +21,7 @@ export function AnimationEditor() {
|
||||
);
|
||||
const [previewElement, setPreviewElement] = useState<PreviewElement>('box');
|
||||
const [mobileTab, setMobileTab] = useState<MobileTab>('edit');
|
||||
const [rightTab, setRightTab] = useState<RightTab>('keyframes');
|
||||
const [rightTab, setRightTab] = useState<RightTab>('export');
|
||||
|
||||
const selectedKeyframe = config.keyframes.find((k) => k.id === selectedId) ?? null;
|
||||
|
||||
@@ -108,6 +108,8 @@ export function AnimationEditor() {
|
||||
|
||||
<div className="border-t border-border/25" />
|
||||
|
||||
<KeyframeTimeline {...timelineProps} embedded />
|
||||
|
||||
<KeyframeProperties keyframe={selectedKeyframe} onChange={updateKeyframeProps} />
|
||||
</div>
|
||||
</div>
|
||||
@@ -123,7 +125,7 @@ export function AnimationEditor() {
|
||||
<div className="glass rounded-xl p-4 flex flex-col flex-1 min-h-0 overflow-hidden">
|
||||
{/* Tab switcher */}
|
||||
<div className="flex glass rounded-lg p-0.5 gap-0.5 mb-4 shrink-0">
|
||||
{(['keyframes', 'export', 'presets'] as RightTab[]).map((t) => (
|
||||
{(['export', 'presets'] as RightTab[]).map((t) => (
|
||||
<button
|
||||
key={t}
|
||||
onClick={() => setRightTab(t)}
|
||||
@@ -134,14 +136,13 @@ export function AnimationEditor() {
|
||||
: 'text-muted-foreground hover:text-foreground'
|
||||
)}
|
||||
>
|
||||
{t === 'keyframes' ? 'Keyframes' : t === 'export' ? 'Export' : 'Presets'}
|
||||
{t === 'export' ? 'Export' : 'Presets'}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
{/* Content */}
|
||||
<div className="flex-1 min-h-0 overflow-y-auto scrollbar-thin scrollbar-thumb-primary/20 scrollbar-track-transparent pr-0.5">
|
||||
{rightTab === 'keyframes' && <KeyframeTimeline {...timelineProps} embedded />}
|
||||
{rightTab === 'export' && <ExportPanel config={config} />}
|
||||
{rightTab === 'export' && <ExportPanel config={config}/>}
|
||||
{rightTab === 'presets' && <PresetLibrary onSelect={loadPreset} />}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user