summaryrefslogtreecommitdiff
path: root/apps/web/src/preview/element-bounds.ts
diff options
context:
space:
mode:
authorMaze Winther <mazewinther@gmail.com>2026-04-29 01:28:50 +0200
committerMaze Winther <mazewinther@gmail.com>2026-05-02 03:27:23 +0200
commit2ee0a44735d2b930348e9774909638b2c1909738 (patch)
treee73e60097338ed411739f3b04808dad86f7bb192 /apps/web/src/preview/element-bounds.ts
parenta9b9cf6bf50f08723896659634f2e6afc17bcd42 (diff)
downloadopencut-2ee0a44735d2b930348e9774909638b2c1909738.tar.gz
refactor: unify element params
Diffstat (limited to 'apps/web/src/preview/element-bounds.ts')
-rw-r--r--apps/web/src/preview/element-bounds.ts9
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/web/src/preview/element-bounds.ts b/apps/web/src/preview/element-bounds.ts
index 0afc6e4e..181fdf1f 100644
--- a/apps/web/src/preview/element-bounds.ts
+++ b/apps/web/src/preview/element-bounds.ts
@@ -7,6 +7,7 @@ import {
getElementLocalTime,
} from "@/animation";
import { resolveTransformAtTime } from "@/rendering/animation-values";
+import { buildTransformFromParams } from "@/rendering";
export interface ElementBounds {
cx: number;
@@ -123,7 +124,7 @@ function getElementBounds({
if (element.type === "video" || element.type === "image") {
const transform = resolveTransformAtTime({
- baseTransform: element.transform,
+ baseTransform: buildTransformFromParams({ params: element.params }),
animations: element.animations,
localTime,
});
@@ -140,7 +141,7 @@ function getElementBounds({
if (element.type === "sticker") {
const transform = resolveTransformAtTime({
- baseTransform: element.transform,
+ baseTransform: buildTransformFromParams({ params: element.params }),
animations: element.animations,
localTime,
});
@@ -155,7 +156,7 @@ function getElementBounds({
if (element.type === "graphic") {
const transform = resolveTransformAtTime({
- baseTransform: element.transform,
+ baseTransform: buildTransformFromParams({ params: element.params }),
animations: element.animations,
localTime,
});
@@ -170,7 +171,7 @@ function getElementBounds({
if (element.type === "text") {
const transform = resolveTransformAtTime({
- baseTransform: element.transform,
+ baseTransform: buildTransformFromParams({ params: element.params }),
animations: element.animations,
localTime,
});