fix(modal): limpa selecao e esconde barra de acoes ao fechar modal, previne overflow vertical

This commit is contained in:
VPS 4 Builder
2026-05-25 01:59:29 +02:00
parent 1dd7360634
commit 1737e5a145
3 changed files with 10 additions and 3 deletions
+7 -1
View File
@@ -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}`;
+2 -2
View File
@@ -6,7 +6,7 @@
<title>Gerenciador de Imagens Dentais</title>
<meta name="description" content="Sistema de gerenciamento de imagens de raio-X dental">
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
<link rel="stylesheet" href="/style.css?v=2.3">
<link rel="stylesheet" href="/style.css?v=2.4">
</head>
<body>
<div class="app-container">
@@ -457,6 +457,6 @@
<!-- Application Script -->
<script src="/socket.io/socket.io.js"></script>
<script src="/app.js?v=2.2"></script>
<script src="/app.js?v=2.4"></script>
</body>
</html>
+1
View File
@@ -705,6 +705,7 @@ body {
gap: 12px;
height: 100%;
align-items: stretch;
overflow-y: auto;
}
/* ---- HORIZONTAL (paisagem) ---- */