From 091923021302258601c63b49668508ac48879ef8 Mon Sep 17 00:00:00 2001 From: dongjin kim Date: Thu, 4 Dec 2025 15:51:06 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B0=A8=EB=9F=89=EC=9D=B8=EC=8B=9D:=20zoom=20?= =?UTF-8?q?in=20=EC=B2=B4=ED=81=AC=EB=B0=95=EC=8A=A4=20=EC=B6=94=EA=B0=80.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/app.js | 35 ++++++++++++++++++++++++++++++++--- public/dashboard.html | 2 +- public/style.css | 9 ++++++++- 3 files changed, 41 insertions(+), 5 deletions(-) diff --git a/public/app.js b/public/app.js index 517fa34..3572f51 100644 --- a/public/app.js +++ b/public/app.js @@ -81,7 +81,7 @@ document.addEventListener('DOMContentLoaded', () => { .catch(e => console.error(e)); } - const filterBar = document.getElementById('filter-bar'); +const filterBar = document.getElementById('filter-bar'); function updateFilterBar(modelCode) { if(!filterBar) return; @@ -90,6 +90,7 @@ document.addEventListener('DOMContentLoaded', () => { const def = MODEL_DEFINITIONS[modelCode]; if(!def) return; + // 1. 기본 'All' 체크박스 생성 const allLabel = document.createElement('label'); allLabel.className = 'filter-check'; const allInput = document.createElement('input'); @@ -107,6 +108,7 @@ document.addEventListener('DOMContentLoaded', () => { const classInputs = []; + // 2. 모델별 클래스 필터 생성 def.classes.forEach(cls => { const label = document.createElement('label'); label.className = 'filter-check'; @@ -121,7 +123,6 @@ document.addEventListener('DOMContentLoaded', () => { // 개별 체크박스 변경 시 로직 input.addEventListener('change', () => { - // 하나라도 꺼지면 All 체크 해제, 모두 켜지면 All 체크 const allChecked = classInputs.every(i => i.checked); allInput.checked = allChecked; updateActiveFilters(classInputs); @@ -135,6 +136,32 @@ document.addEventListener('DOMContentLoaded', () => { updateActiveFilters(classInputs); }); + // 3. [신규 기능] LPR(차량 인식) 모드일 때만 'Zoom In' 체크박스 추가 + if (modelCode === 'LPR') { + const zoomLabel = document.createElement('label'); + zoomLabel.className = 'filter-check filter-push-right'; // 우측 정렬 클래스 적용 + + const zoomInput = document.createElement('input'); + zoomInput.type = 'checkbox'; + zoomInput.id = 'zoom-toggle'; + zoomInput.checked = false; // 기본값: 선택 안 됨 + + // 줌 기능 이벤트 리스너 (필요 시 로직 구현) + zoomInput.addEventListener('change', (e) => { + if(e.target.checked) { + console.log("Zoom In Activated"); + // 여기에 줌 확대 로직 추가 + } else { + console.log("Zoom In Deactivated"); + // 여기에 줌 해제 로직 추가 + } + }); + + zoomLabel.appendChild(zoomInput); + zoomLabel.append(' Zoom In'); + filterBar.appendChild(zoomLabel); + } + // 초기 필터 상태 반영 updateActiveFilters(classInputs); } @@ -472,4 +499,6 @@ document.addEventListener('DOMContentLoaded', () => { } loadModelList(); -}); \ No newline at end of file +}); + +//2025-12-04 15:41 \ No newline at end of file diff --git a/public/dashboard.html b/public/dashboard.html index 44f8bf2..23ff45d 100644 --- a/public/dashboard.html +++ b/public/dashboard.html @@ -216,4 +216,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/style.css b/public/style.css index 0745b5d..6998dc0 100644 --- a/public/style.css +++ b/public/style.css @@ -165,6 +165,13 @@ main { min-width: 0; } +.filter-push-right { + margin-left: auto; /* Flex 컨테이너에서 우측 끝으로 밀어냄 */ + margin-right: 10px; + font-weight: bold; + color: #ffd700; /* 눈에 띄게 노란색 계열 강조 (선택 사항) */ +} + /* 상단 필터 바 */ .filter-bar { height: 40px; background-color: #444; @@ -334,4 +341,4 @@ main { @keyframes zoom { from {transform:scale(0)} to {transform:scale(1)} } .close-viewer { position: absolute; top: 20px; right: 35px; color: #f1f1f1; font-size: 40px; font-weight: bold; transition: 0.3s; cursor: pointer; z-index: 2001; } -/*//2025-12-04 15:13*/ \ No newline at end of file +/*//2025-12-04 15:41*/ \ No newline at end of file