diff options
| author | Maze Winther <mazewinther@gmail.com> | 2026-04-29 01:59:46 +0200 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2026-05-02 03:27:23 +0200 |
| commit | b8d08df244b97b1d3131cb2d076166838189eeb0 (patch) | |
| tree | 01f8ea0ce75c5a8b73e4b8d64c5456f40a2ff142 /apps/web/src/text | |
| parent | 2ee0a44735d2b930348e9774909638b2c1909738 (diff) | |
| download | opencut-b8d08df244b97b1d3131cb2d076166838189eeb0.tar.gz | |
chore: cleanup
Diffstat (limited to 'apps/web/src/text')
| -rw-r--r-- | apps/web/src/text/background.ts | 10 | ||||
| -rw-r--r-- | apps/web/src/text/layout.ts | 2 | ||||
| -rw-r--r-- | apps/web/src/text/measure-element.ts | 3 |
3 files changed, 13 insertions, 2 deletions
diff --git a/apps/web/src/text/background.ts b/apps/web/src/text/background.ts index be5ab6f5..baa67a52 100644 --- a/apps/web/src/text/background.ts +++ b/apps/web/src/text/background.ts @@ -1,2 +1,12 @@ export const CORNER_RADIUS_MIN = 0; export const CORNER_RADIUS_MAX = 100; + +export interface TextBackground { + enabled: boolean; + color: string; + cornerRadius?: number; + paddingX?: number; + paddingY?: number; + offsetX?: number; + offsetY?: number; +} diff --git a/apps/web/src/text/layout.ts b/apps/web/src/text/layout.ts index 65e17291..c52abc30 100644 --- a/apps/web/src/text/layout.ts +++ b/apps/web/src/text/layout.ts @@ -1,4 +1,4 @@ -import type { TextBackground } from "@/timeline"; +import type { TextBackground } from "@/text/background"; import { DEFAULTS } from "@/timeline/defaults"; import type { TextAlign } from "@/text/primitives"; diff --git a/apps/web/src/text/measure-element.ts b/apps/web/src/text/measure-element.ts index d89cd2f8..28e97eac 100644 --- a/apps/web/src/text/measure-element.ts +++ b/apps/web/src/text/measure-element.ts @@ -1,6 +1,7 @@ import { CORNER_RADIUS_MIN } from "@/text/background"; import { DEFAULTS } from "@/timeline/defaults"; -import type { TextBackground, TextElement } from "@/timeline"; +import type { TextElement } from "@/timeline"; +import type { TextBackground } from "@/text/background"; import { resolveNumberAtTime } from "@/animation/values"; import { getTextVisualRect, |
