style: otimização compacta dos controles de ajuste fino integrados na legenda e remoção de labels no modal
This commit is contained in:
@@ -625,6 +625,13 @@ function selectTransform(index) {
|
||||
fineTuneAngle = 0;
|
||||
updateFineTuneDisplay();
|
||||
|
||||
// Mover a legenda do card selecionado para o placeholder de ajuste fino
|
||||
const nameEl = el.querySelector('.transform-name');
|
||||
const placeholder = document.getElementById('fineTuneLabelPlaceholder');
|
||||
if (nameEl && placeholder) {
|
||||
placeholder.appendChild(nameEl);
|
||||
}
|
||||
|
||||
// Mover o contêiner de ajuste fino para dentro do card selecionado
|
||||
const ftContainer = document.getElementById('fineTuneContainer');
|
||||
if (ftContainer) {
|
||||
@@ -646,6 +653,16 @@ function clearTransformSelection() {
|
||||
const container = document.getElementById('transformOptions');
|
||||
container.classList.remove('selection-mode');
|
||||
|
||||
// Devolver a legenda ativa para o card selecionado
|
||||
const ftPlaceholder = document.getElementById('fineTuneLabelPlaceholder');
|
||||
if (ftPlaceholder) {
|
||||
const activeLabel = ftPlaceholder.querySelector('.transform-name');
|
||||
const selectedEl = document.querySelector('.transform-option.selected');
|
||||
if (activeLabel && selectedEl) {
|
||||
selectedEl.appendChild(activeLabel);
|
||||
}
|
||||
}
|
||||
|
||||
// Mover o contêiner de ajuste fino de volta para o Wrapper e esconder
|
||||
const ftContainer = document.getElementById('fineTuneContainer');
|
||||
if (ftContainer) {
|
||||
|
||||
@@ -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">
|
||||
<link rel="stylesheet" href="/style.css?v=2.1">
|
||||
</head>
|
||||
<body>
|
||||
<div class="app-container">
|
||||
@@ -129,22 +129,28 @@
|
||||
<div id="transformViewWrapper" style="display: flex; flex-direction: column; flex: 1; min-height: 0; height: 100%;">
|
||||
<div id="transformOptions" class="transform-grid" style="flex: 1; min-height: 0;"></div>
|
||||
<div id="transformActionArea" style="display: none; margin-top: 15px; background: #f8f9fa; padding: 15px; border-radius: 8px; flex-shrink: 0; border: 1px solid #e3e8ee;">
|
||||
<label style="font-weight: 600; display: block; margin-bottom: 8px;">Nova Observação / Detalhes (Opcional):</label>
|
||||
<textarea id="newImageRemark" class="search-input" rows="2" style="width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 6px;" placeholder="Ex: Raio-X Dente 45..."></textarea>
|
||||
<textarea id="newImageRemark" class="search-input" rows="2" style="width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 6px;" placeholder="Nova Observação / Detalhes (Opcional)..."></textarea>
|
||||
<div style="display: flex; gap: 10px; margin-top: 10px;">
|
||||
<button class="btn btn-secondary" style="flex: 1; padding: 12px; font-size: 1.1rem;" onclick="clearTransformSelection()">Cancelar</button>
|
||||
<button id="btnSaveTransform" class="btn btn-primary" style="flex: 2; padding: 12px; font-size: 1.1rem;" onclick="saveSelectedTransform()">Salvar Nova Imagem</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Bloco de Ajuste Fino (Movido dinamicamente para o card selecionado) -->
|
||||
<!-- Bloco de Ajuste Fino (Integrado na legenda do card selecionado) -->
|
||||
<div id="fineTuneContainer" style="display: none;" onclick="event.stopPropagation()">
|
||||
<div class="fine-tune-left-btns">
|
||||
<button type="button" onclick="adjustFineTune(-5)" title="Rotacionar -5°">-5°</button>
|
||||
<button type="button" onclick="adjustFineTune(-1)" title="Rotacionar -1°">-1°</button>
|
||||
<div class="fine-tune-val-display" id="fineTuneValDisplay">0°</div>
|
||||
</div>
|
||||
|
||||
<div id="fineTuneLabelPlaceholder"></div>
|
||||
|
||||
<div class="fine-tune-right-btns">
|
||||
<button type="button" onclick="adjustFineTune(1)" title="Rotacionar +1°">+1°</button>
|
||||
<button type="button" onclick="adjustFineTune(5)" title="Rotacionar +5°">+5°</button>
|
||||
<button type="button" id="btnResetFineTune" onclick="resetFineTune()" style="display: none; background: #e53e3e; border-color: #e53e3e; color: white; border-radius: 15px; width: auto; padding: 0 10px; height: 32px;" title="Resetar ajuste fino">Reset</button>
|
||||
</div>
|
||||
|
||||
<button type="button" id="btnResetFineTune" onclick="resetFineTune()" style="display: none;" title="Resetar ajuste fino">↩️ Reset</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -451,6 +457,6 @@
|
||||
|
||||
<!-- Application Script -->
|
||||
<script src="/socket.io/socket.io.js"></script>
|
||||
<script src="/app.js"></script>
|
||||
<script src="/app.js?v=2.1"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -755,8 +755,8 @@ body {
|
||||
grid-row: auto !important;
|
||||
}
|
||||
.selection-mode .transform-image-wrapper {
|
||||
height: 45vh !important;
|
||||
max-height: 500px;
|
||||
height: 35vh !important;
|
||||
max-height: 420px;
|
||||
}
|
||||
/* -90°: col 4, linha 2 (empilhado sob +90°) */
|
||||
.transform-grid.grid-portrait .transform-option:nth-child(5) { grid-column: 4; grid-row: 2; }
|
||||
@@ -829,47 +829,42 @@ body {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* Estilo do Ajuste Fino Sobreposto como Marca d'Água */
|
||||
/* Nova Barra Inferior de Ajuste Fino para o Card Selecionado */
|
||||
#fineTuneContainer {
|
||||
position: absolute;
|
||||
bottom: 45px; /* Logo acima do transform-name */
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
background: rgba(255, 255, 255, 0.96);
|
||||
backdrop-filter: blur(8px);
|
||||
-webkit-backdrop-filter: blur(8px);
|
||||
border: 1px solid rgba(0, 0, 0, 0.15);
|
||||
border-radius: 30px;
|
||||
padding: 6px 12px;
|
||||
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.18);
|
||||
z-index: 100;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
width: max-content;
|
||||
animation: fadeIn 0.2s ease-out;
|
||||
justify-content: space-between;
|
||||
padding: 5px 8px;
|
||||
background: rgba(0, 0, 0, 0.03);
|
||||
border-radius: 20px;
|
||||
border: 1px solid rgba(0, 0, 0, 0.08);
|
||||
box-sizing: border-box;
|
||||
margin-top: 10px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
@keyframes fadeIn {
|
||||
from { opacity: 0; transform: translateX(-50%) translateY(5px); }
|
||||
to { opacity: 1; transform: translateX(-50%) translateY(0); }
|
||||
.fine-tune-left-btns,
|
||||
.fine-tune-right-btns {
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
#fineTuneContainer button {
|
||||
background: #f1f3f5;
|
||||
background: #ffffff;
|
||||
border: 1px solid #ced4da;
|
||||
border-radius: 50%;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 0.8rem;
|
||||
border-radius: 12px;
|
||||
padding: 4px 8px;
|
||||
font-size: 0.75rem;
|
||||
font-weight: 700;
|
||||
color: #495057;
|
||||
cursor: pointer;
|
||||
transition: all 0.15s ease;
|
||||
min-width: 32px;
|
||||
height: 24px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
#fineTuneContainer button:hover {
|
||||
@@ -878,13 +873,53 @@ body {
|
||||
color: #212529;
|
||||
}
|
||||
|
||||
#fineTuneContainer .fine-tune-val-display {
|
||||
min-width: 48px;
|
||||
text-align: center;
|
||||
font-family: monospace;
|
||||
font-weight: 700;
|
||||
font-size: 1rem;
|
||||
color: var(--primary-color);
|
||||
#fineTuneContainer button:active {
|
||||
transform: scale(0.95);
|
||||
}
|
||||
|
||||
/* Centralização do Título/Legenda */
|
||||
#fineTuneLabelPlaceholder {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 0 5px;
|
||||
min-width: 0; /* Permite truncar se necessário */
|
||||
}
|
||||
|
||||
#fineTuneLabelPlaceholder .transform-name {
|
||||
margin-bottom: 0;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
/* Botão Reset Flutuante no Canto Superior Direito do Card */
|
||||
#btnResetFineTune {
|
||||
position: absolute !important;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
background: rgba(229, 62, 62, 0.9) !important;
|
||||
border: 1px solid #e53e3e !important;
|
||||
color: #ffffff !important;
|
||||
border-radius: 50% !important;
|
||||
width: 28px !important;
|
||||
height: 28px !important;
|
||||
padding: 0 !important;
|
||||
display: flex !important;
|
||||
align-items: center !important;
|
||||
justify-content: center !important;
|
||||
font-size: 0.7rem !important;
|
||||
cursor: pointer;
|
||||
z-index: 100;
|
||||
box-shadow: 0 2px 6px rgba(0,0,0,0.15);
|
||||
}
|
||||
|
||||
#btnResetFineTune:hover {
|
||||
background: #c53030 !important;
|
||||
border-color: #c53030 !important;
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user