backend: split assets into objects

This commit is contained in:
2025-10-20 16:28:57 +02:00
parent 96a6d0ee5d
commit c44ba91ec7
9 changed files with 163 additions and 105 deletions
+4 -2
View File
@@ -502,8 +502,10 @@ const SkeuomorphicWorkspace = ({
(doc) => {
if (!doc) return null;
const asset = resolvePreviewAsset(doc);
const width = asset?.metadata?.width;
const height = asset?.metadata?.height;
const primaryObject = asset?.objects?.[0] || null;
const primaryMetadata = primaryObject?.metadata || asset?.metadata || {};
const width = primaryMetadata?.width;
const height = primaryMetadata?.height;
if (typeof width === 'number' && typeof height === 'number') {
return { width, height };
}