fix: keyframe timeline
This commit is contained in:
@@ -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 */}
|
||||
<div
|
||||
ref={trackRef}
|
||||
className="relative h-14 bg-white/3 rounded-lg border border-border/25 cursor-crosshair select-none"
|
||||
className="relative h-14 bg-white/3 rounded-lg border border-border/25 cursor-crosshair select-none mx-4"
|
||||
onClick={handleTrackClick}
|
||||
>
|
||||
<div className="absolute inset-x-0 top-1/2 -translate-y-1/2 h-px bg-border/30" />
|
||||
{TICKS.map((tick) => (
|
||||
<div
|
||||
key={tick}
|
||||
className="absolute top-0 bottom-0 flex flex-col items-center pointer-events-none"
|
||||
className="absolute top-0 bottom-0 flex flex-col items-center pointer-events-none -ml-1.5"
|
||||
style={{ left: `${tick}%` }}
|
||||
>
|
||||
<div className="w-px h-2 bg-muted-foreground/20" />
|
||||
@@ -118,7 +118,7 @@ export function KeyframeTimeline({ keyframes, selectedId, onSelect, onAdd, onDel
|
||||
</div>
|
||||
|
||||
{/* Offset labels */}
|
||||
<div className="relative h-4">
|
||||
<div className="relative h-4 mx-4">
|
||||
{sorted.map((kf) => (
|
||||
<span
|
||||
key={kf.id}
|
||||
|
||||
Reference in New Issue
Block a user