From 2bfa9dc476dc398184517034731df16c20c0734b Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Wed, 30 Nov 2022 18:22:15 +0000 Subject: [PATCH] fix(ui): display images/videos smaller in timeline (#257) --- components/status/StatusAttachment.vue | 9 +++++++++ components/status/StatusCard.vue | 1 + components/status/StatusMedia.vue | 5 ++++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/components/status/StatusAttachment.vue b/components/status/StatusAttachment.vue index 34093f59..228c1586 100644 --- a/components/status/StatusAttachment.vue +++ b/components/status/StatusAttachment.vue @@ -26,6 +26,12 @@ const aspectRatio = computed(() => { return clamp(rawAspectRatio.value, 0.5, 2) return undefined }) + +const objectPosition = computed(() => { + return [attachment.meta?.focus?.x, attachment.meta?.focus?.y] + .map(v => v ? `${v * 100}%` : '50%') + .join(' ') +})