mirror of
https://github.com/vibegif/vibegif.lol.git
synced 2026-04-07 02:12:12 +00:00
Fix: aspect-ratio-aware frame previews
This commit is contained in:
@@ -44,11 +44,13 @@ export function resetProgress(el) {
|
||||
if (el.framesPreview) el.framesPreview.innerHTML = '';
|
||||
}
|
||||
|
||||
export function addFramePreview(el, src, index) {
|
||||
export function addFramePreview(el, src, index, aspectRatio = '1:1') {
|
||||
if (!el.framesPreview) return;
|
||||
const img = document.createElement('img');
|
||||
img.src = src;
|
||||
img.className = 'w-16 h-16 rounded-lg border border-neutral-200 object-cover';
|
||||
img.className = 'h-16 rounded-lg border border-neutral-200 object-cover bg-white';
|
||||
img.style.aspectRatio = aspectRatio;
|
||||
img.style.width = 'auto';
|
||||
img.title = `frame ${index + 1}`;
|
||||
el.framesPreview.appendChild(img);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user