From db5c7a96a605082363602cd972794afe12e12be9 Mon Sep 17 00:00:00 2001 From: Taehoon Date: Mon, 1 Jun 2026 16:34:57 +0900 Subject: [PATCH] fix: restore map editor layout and event binding logic --- map_config.json | 148 +++++++++++++++++++++++++++++++++++++++++ map_editor.html | 12 ++-- src/views/MapEditor.ts | 6 +- 3 files changed, 158 insertions(+), 8 deletions(-) diff --git a/map_config.json b/map_config.json index 68b6949..7b4bbdc 100644 --- a/map_config.json +++ b/map_config.json @@ -616,5 +616,153 @@ "w": "44.38", "h": "6.53" } + ], + "img/location_photo/기술개발센터/서버실/서버실_1.png": [ + { + "x": "69.53", + "y": "1.42", + "w": "8.58", + "h": "11.45" + }, + { + "x": "79.21", + "y": "1.55", + "w": "11.97", + "h": "11.32" + }, + { + "x": "90.24", + "y": "23.30", + "w": "8.50", + "h": "21.49" + }, + { + "x": "53.07", + "y": "53.28", + "w": "8.74", + "h": "21.62" + }, + { + "x": "62.28", + "y": "53.41", + "w": "8.82", + "h": "21.49" + }, + { + "x": "71.50", + "y": "53.28", + "w": "8.90", + "h": "21.75" + }, + { + "x": "80.87", + "y": "53.15", + "w": "8.66", + "h": "21.75" + }, + { + "x": "90.08", + "y": "53.54", + "w": "8.90", + "h": "21.49" + }, + { + "x": "43.86", + "y": "76.32", + "w": "8.82", + "h": "21.75" + }, + { + "x": "53.15", + "y": "76.45", + "w": "8.66", + "h": "21.49" + }, + { + "x": "62.52", + "y": "76.57", + "w": "8.58", + "h": "21.62" + }, + { + "x": "71.65", + "y": "76.45", + "w": "8.66", + "h": "21.62" + }, + { + "x": "80.94", + "y": "76.57", + "w": "8.74", + "h": "21.49" + }, + { + "x": "90.24", + "y": "76.57", + "w": "8.50", + "h": "21.36" + } + ], + "img/location_photo/기술개발센터/서버실/서버실_2.png": [ + { + "x": "49.47", + "y": "1.80", + "w": "47.49", + "h": "7.04" + }, + { + "x": "49.47", + "y": "12.04", + "w": "47.49", + "h": "6.91" + }, + { + "x": "49.60", + "y": "21.52", + "w": "47.35", + "h": "6.91" + }, + { + "x": "49.47", + "y": "30.48", + "w": "47.49", + "h": "7.04" + }, + { + "x": "49.60", + "y": "39.82", + "w": "47.49", + "h": "6.91" + }, + { + "x": "49.47", + "y": "50.06", + "w": "47.62", + "h": "6.91" + }, + { + "x": "49.74", + "y": "59.28", + "w": "47.22", + "h": "6.91" + }, + { + "x": "49.34", + "y": "68.37", + "w": "47.75", + "h": "7.04" + }, + { + "x": "49.60", + "y": "77.97", + "w": "47.22", + "h": "6.91" + }, + { + "x": "49.60", + "y": "86.93", + "w": "47.35", + "h": "7.17" + } ] } \ No newline at end of file diff --git a/map_editor.html b/map_editor.html index 220fd7c..ea0b683 100644 --- a/map_editor.html +++ b/map_editor.html @@ -1,10 +1,12 @@ - + + ITAM Map Coordinate Editor v3.0 + - +
@@ -25,12 +27,12 @@

드래그하여 구역을 정의하세요. 저장 버튼을 누르면 즉시 시스템에 반영됩니다.

- +
- - + +
diff --git a/src/views/MapEditor.ts b/src/views/MapEditor.ts index c705389..7e815d1 100644 --- a/src/views/MapEditor.ts +++ b/src/views/MapEditor.ts @@ -152,14 +152,14 @@ export class MapEditor { this.render(); }; - (window as any).clearAll = () => { + document.getElementById('btn-clear-all')?.addEventListener('click', () => { if(confirm('모든 박스를 삭제할까요?')) { this.boxes = []; this.render(); } - }; + }); - (window as any).saveToServer = () => this.saveToServer(); + document.getElementById('btn-save-server')?.addEventListener('click', () => this.saveToServer()); } private async saveToServer() {