fix(modal): limpa selecao e esconde barra de acoes ao fechar modal, previne overflow vertical
This commit is contained in:
@@ -186,10 +186,14 @@ function setupEventListeners() {
|
||||
|
||||
// Transform modal close on backdrop
|
||||
transformModal.addEventListener('click', e => {
|
||||
if (e.target === transformModal) transformModal.classList.remove('active');
|
||||
if (e.target === transformModal) {
|
||||
transformModal.classList.remove('active');
|
||||
if (typeof clearTransformSelection === 'function') clearTransformSelection();
|
||||
}
|
||||
});
|
||||
document.getElementById('closeTransformModal').addEventListener('click', () => {
|
||||
transformModal.classList.remove('active');
|
||||
if (typeof clearTransformSelection === 'function') clearTransformSelection();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -551,6 +555,8 @@ async function showTransformModal(imageId) {
|
||||
if (!image) {
|
||||
throw new Error('Imagem não encontrada localmente');
|
||||
}
|
||||
|
||||
if (typeof clearTransformSelection === 'function') clearTransformSelection();
|
||||
|
||||
// Se existir thumb_filename, usar ele; caso contrário, fallback para a imagem cheia
|
||||
const imageUrl = image.thumb_filename ? `/uploads/${image.thumb_filename}` : `/uploads/${image.filename}`;
|
||||
|
||||
Reference in New Issue
Block a user