fix: restore ready-sheet preview behavior
This commit is contained in:
@@ -372,8 +372,6 @@ h1 em{font-style:normal;color:var(--laranja)}
|
||||
#vArea .folhaPrevias{min-height:200px;padding:10px;display:grid;gap:12px;background:#F8F9FA}
|
||||
#vArea .folhaPrevia{margin:0;background:#fff;border:1px solid var(--linha);border-radius:6px;overflow:hidden}
|
||||
#vArea .folhaPrevia img{width:100%;height:auto;max-height:520px;object-fit:contain;display:block;background:#fff}
|
||||
#vArea .folhaRepeticoes{display:flex;flex-direction:column;align-items:center;gap:2px;padding:8px;background:#fff}
|
||||
#vArea .folhaRepeticoes img{width:auto;max-width:100%;object-fit:contain;display:block;background:#fff}
|
||||
#vArea .folhaPrevia figcaption{padding:7px 9px;font-size:10.5px;color:var(--fraco);border-top:1px solid var(--linha)}
|
||||
#vArea .semmont{border:0;min-height:200px;display:flex;flex-direction:column;
|
||||
align-items:center;justify-content:center}
|
||||
@@ -2514,21 +2512,11 @@ function previaAoVivo(){
|
||||
const painel=document.createElement('div'); painel.className='folhaPrevias';
|
||||
previews.forEach((x,index)=>{
|
||||
const figura=document.createElement('figure'); figura.className='folhaPrevia';
|
||||
const repeticoes=Math.max(1,Math.min(200,x.rep||1));
|
||||
const sequencia=document.createElement('div'); sequencia.className='folhaRepeticoes';
|
||||
// The whole printed strip remains visible: repeated sheets are scaled
|
||||
// together rather than hiding every copy below the panel fold.
|
||||
const alturaMax=Math.max(48,Math.floor(480/repeticoes));
|
||||
for(let copia=0;copia<repeticoes;copia++){
|
||||
const imagem=new Image(); imagem.src=x.previewSrc;
|
||||
imagem.alt=x.f.name+' · repetição '+(copia+1)+' de '+repeticoes;
|
||||
imagem.style.maxHeight=alturaMax+'px'; sequencia.append(imagem);
|
||||
}
|
||||
const imagem=new Image(); imagem.src=x.previewSrc; imagem.alt=x.f.name;
|
||||
const legenda=document.createElement('figcaption');
|
||||
legenda.textContent=(previews.length>1 ? (index+1)+'. ' : '')+x.f.name+
|
||||
(x.med ? ' · '+n1(x.med.larg)+' × '+n1(x.med.alt)+' cm' : '')+
|
||||
(repeticoes>1 ? ' · '+repeticoes+' repetições em sequência' : '');
|
||||
figura.append(sequencia,legenda); painel.append(figura);
|
||||
(x.med ? ' · '+n1(x.med.larg)+' × '+n1(x.med.alt)+' cm' : '');
|
||||
figura.append(imagem,legenda); painel.append(figura);
|
||||
});
|
||||
$('vArea').replaceChildren(painel);
|
||||
}else{
|
||||
|
||||
Reference in New Issue
Block a user