summaryrefslogtreecommitdiff
path: root/apps/web/src/components/editor
diff options
context:
space:
mode:
authoriza <59828082+izadoesdev@users.noreply.github.com>2025-06-25 07:59:11 +0300
committerGitHub <noreply@github.com>2025-06-25 07:59:11 +0300
commit4a8ff91ae383ec7d696981a92b6addc652458a80 (patch)
tree3847d2f03ab10d27720539a652df00ec87a42d45 /apps/web/src/components/editor
parentb8057cdd302628b20c2cd1a29f9dd95ec54df555 (diff)
parent7de09adce696442b0ba536bd3895f335246c744b (diff)
downloadopencut-4a8ff91ae383ec7d696981a92b6addc652458a80.tar.gz
Merge pull request #76 from creotove/main
Fix: [BUG] buttons jitter left and right #67
Diffstat (limited to 'apps/web/src/components/editor')
-rw-r--r--apps/web/src/components/editor/timeline.tsx58
1 files changed, 30 insertions, 28 deletions
diff --git a/apps/web/src/components/editor/timeline.tsx b/apps/web/src/components/editor/timeline.tsx
index 12907738..16dcb34f 100644
--- a/apps/web/src/components/editor/timeline.tsx
+++ b/apps/web/src/components/editor/timeline.tsx
@@ -602,38 +602,40 @@ export function Timeline() {
<div className="w-px h-6 bg-border mx-1" />
{/* Time Display */}
- <div className="text-xs text-muted-foreground font-mono px-2">
- {Math.floor(currentTime * 10) / 10}s /{" "}
- {Math.floor(duration * 10) / 10}s
+ <div className="text-xs text-muted-foreground font-mono px-2"
+ style={{ minWidth: '18ch', textAlign: 'center' }}
+ >
+ {currentTime.toFixed(1)}s / {duration.toFixed(1)}s
</div>
- <div className="w-px h-6 bg-border mx-1" />
-
{/* Test Clip Button - for debugging */}
{tracks.length === 0 && (
- <Tooltip>
- <TooltipTrigger asChild>
- <Button
- variant="outline"
- size="sm"
- onClick={() => {
- const trackId = addTrack("video");
- addClipToTrack(trackId, {
- mediaId: "test",
- name: "Test Clip",
- duration: 5,
- startTime: 0,
- trimStart: 0,
- trimEnd: 0,
- });
- }}
- className="text-xs"
- >
- Add Test Clip
- </Button>
- </TooltipTrigger>
- <TooltipContent>Add a test clip to try playback</TooltipContent>
- </Tooltip>
+ <>
+ <div className="w-px h-6 bg-border mx-1" />
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <Button
+ variant="outline"
+ size="sm"
+ onClick={() => {
+ const trackId = addTrack("video");
+ addClipToTrack(trackId, {
+ mediaId: "test",
+ name: "Test Clip",
+ duration: 5,
+ startTime: 0,
+ trimStart: 0,
+ trimEnd: 0,
+ });
+ }}
+ className="text-xs"
+ >
+ Add Test Clip
+ </Button>
+ </TooltipTrigger>
+ <TooltipContent>Add a test clip to try playback</TooltipContent>
+ </Tooltip>
+ </>
)}
<div className="w-px h-6 bg-border mx-1" />