Fix: aspect-ratio-aware frame previews

This commit is contained in:
2026-03-21 01:14:44 -07:00
parent 488ad2e1a3
commit d7a54fa5f6

View File

@@ -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);
}