Merge pull request #76 from creotove/main
Fix: [BUG] buttons jitter left and right #67
This commit is contained in:
@ -602,38 +602,40 @@ export function Timeline() {
|
|||||||
<div className="w-px h-6 bg-border mx-1" />
|
<div className="w-px h-6 bg-border mx-1" />
|
||||||
|
|
||||||
{/* Time Display */}
|
{/* Time Display */}
|
||||||
<div className="text-xs text-muted-foreground font-mono px-2">
|
<div className="text-xs text-muted-foreground font-mono px-2"
|
||||||
{Math.floor(currentTime * 10) / 10}s /{" "}
|
style={{ minWidth: '18ch', textAlign: 'center' }}
|
||||||
{Math.floor(duration * 10) / 10}s
|
>
|
||||||
|
{currentTime.toFixed(1)}s / {duration.toFixed(1)}s
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="w-px h-6 bg-border mx-1" />
|
|
||||||
|
|
||||||
{/* Test Clip Button - for debugging */}
|
{/* Test Clip Button - for debugging */}
|
||||||
{tracks.length === 0 && (
|
{tracks.length === 0 && (
|
||||||
<Tooltip>
|
<>
|
||||||
<TooltipTrigger asChild>
|
<div className="w-px h-6 bg-border mx-1" />
|
||||||
<Button
|
<Tooltip>
|
||||||
variant="outline"
|
<TooltipTrigger asChild>
|
||||||
size="sm"
|
<Button
|
||||||
onClick={() => {
|
variant="outline"
|
||||||
const trackId = addTrack("video");
|
size="sm"
|
||||||
addClipToTrack(trackId, {
|
onClick={() => {
|
||||||
mediaId: "test",
|
const trackId = addTrack("video");
|
||||||
name: "Test Clip",
|
addClipToTrack(trackId, {
|
||||||
duration: 5,
|
mediaId: "test",
|
||||||
startTime: 0,
|
name: "Test Clip",
|
||||||
trimStart: 0,
|
duration: 5,
|
||||||
trimEnd: 0,
|
startTime: 0,
|
||||||
});
|
trimStart: 0,
|
||||||
}}
|
trimEnd: 0,
|
||||||
className="text-xs"
|
});
|
||||||
>
|
}}
|
||||||
Add Test Clip
|
className="text-xs"
|
||||||
</Button>
|
>
|
||||||
</TooltipTrigger>
|
Add Test Clip
|
||||||
<TooltipContent>Add a test clip to try playback</TooltipContent>
|
</Button>
|
||||||
</Tooltip>
|
</TooltipTrigger>
|
||||||
|
<TooltipContent>Add a test clip to try playback</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<div className="w-px h-6 bg-border mx-1" />
|
<div className="w-px h-6 bg-border mx-1" />
|
||||||
|
Reference in New Issue
Block a user