fix: restore map editor layout and event binding logic

This commit is contained in:
2026-06-01 16:34:57 +09:00
parent 9cd5d59bf8
commit db5c7a96a6
3 changed files with 158 additions and 8 deletions

View File

@@ -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"
}
]
}

View File

@@ -1,10 +1,12 @@
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>ITAM Map Coordinate Editor v3.0</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable.min.css" />
</head>
<body>
<body style="margin: 0; display: flex; height: 100vh; overflow: hidden; font-family: sans-serif;">
<!-- Left: File Selector -->
<div class="file-sidebar" id="file-sidebar">
@@ -25,12 +27,12 @@
<p>
드래그하여 구역을 정의하세요. 저장 버튼을 누르면 즉시 시스템에 반영됩니다.
</p>
<div class="box-list" id="box-list"></div>
<div class="actions">
<button class="btn btn-outline" style="height:38px;" onclick="clearAll()">전체 삭제</button>
<button id="btn-save-server" class="btn btn-primary" style="height:38px;" onclick="saveToServer()">서버에 즉시 저장</button>
<button id="btn-clear-all" class="btn btn-outline" style="height:38px;">전체 삭제</button>
<button id="btn-save-server" class="btn btn-primary" style="height:38px;">서버에 즉시 저장</button>
<div id="save-status"></div>
</div>
</div>

View File

@@ -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() {