From 8eb4e8c9a22e424a88d2fcec6fa3ddbc1c1d924f Mon Sep 17 00:00:00 2001 From: DDD1542 Date: Thu, 7 May 2026 13:34:20 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=ED=99=94=EC=9E=AC=20=EC=95=8C=EB=9E=8C?= =?UTF-8?q?=20=EB=8D=B0=EB=AA=A8=20SCADA=20=EC=8A=A4=ED=83=80=EC=9D=BC=20?= =?UTF-8?q?=EA=B2=BD=EA=B3=A0=20=EC=9D=B8=EB=94=94=EC=BC=80=EC=9D=B4?= =?UTF-8?q?=ED=84=B0=20+=20ZONE=2017=20=EC=BD=98=ED=85=90=EC=B8=A0=20?= =?UTF-8?q?=EC=A0=95=EB=A0=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 각 zone 중앙에 SCADA 스타일 경고 비콘 자동 삽입 (펄스 링 + 빨간 배지 + 노란 경고 삼각형) - WARN/ALARM 별 색상 분리 (CSS 변수 --b-* 로 SVG shadow DOM 통과) - WARN: 노란 톤 + 정적 표시 - ALARM: 빨간 톤 + drop-shadow + brightness 깜빡임 - zone-area 점선 테두리: warn(노란/얇음), alarm(빨간/굵음+pulse) - ZONE 17 콘텐츠를 ZONE 18 비례에 맞춰 재배치 (label y 453→396) — manual-call 과 라벨 겹침 해소 Co-Authored-By: Claude Opus 4.7 (1M context) --- frontend/public/fire-alarm-demo/index.html | 101 +++++++++++++++++++-- 1 file changed, 94 insertions(+), 7 deletions(-) diff --git a/frontend/public/fire-alarm-demo/index.html b/frontend/public/fire-alarm-demo/index.html index 411bd325..b41cfd8b 100644 --- a/frontend/public/fire-alarm-demo/index.html +++ b/frontend/public/fire-alarm-demo/index.html @@ -789,6 +789,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1107,9 +1169,9 @@ - ZONE 17 - - + ZONE 17 + + @@ -1857,6 +1919,30 @@ }); } + // 각 zone 중앙에 경광등 자동 삽입 (alarm/warn 시 자동 표시) + function attachBeacons() { + const NS = "http://www.w3.org/2000/svg"; + const W = 76, H = 76; // 정사각 viewBox 100x100 + document.querySelectorAll(".zone").forEach(group => { + const rect = group.querySelector(".zone-area"); + if (!rect) return; + const x = parseFloat(rect.getAttribute("x")); + const y = parseFloat(rect.getAttribute("y")); + const w = parseFloat(rect.getAttribute("width")); + const h = parseFloat(rect.getAttribute("height")); + const cx = x + w / 2; + const cy = y + h / 2; + const use = document.createElementNS(NS, "use"); + use.setAttribute("href", "#beacon"); + use.setAttribute("x", cx - W / 2); + use.setAttribute("y", cy - H / 2 - 6); // zone 중앙 약간 위 + use.setAttribute("width", W); + use.setAttribute("height", H); + use.setAttribute("class", "zone-beacon"); + group.appendChild(use); + }); + } + setClock(); setInterval(() => { setClock(); @@ -1867,6 +1953,7 @@ renderAll(); updatePressure(); bindSvgClick(); + attachBeacons(); addLog(`SYSTEM READY fire monitoring system initialized.`); addLog(`NORMAL all devices communication OK.`);