Spaces:
Paused
Paused
debug: hold 진단 로그를 좌상단 누적 박스로 (토스트 대체)
Browse files600ms 토스트는 너무 빨라 시퀀스 읽기 어려움.
좌상단 모노스페이스 박스에 최근 8개 이벤트 + 타임스탬프 표시, 8초 유지.
- index.html +17 -1
index.html
CHANGED
|
@@ -2436,8 +2436,24 @@ function closeAddModal() { $('#addModal').classList.remove('show'); }
|
|
| 2436 |
_dbg('FIRE');
|
| 2437 |
}, HOLD_MS);
|
| 2438 |
}
|
|
|
|
|
|
|
|
|
|
| 2439 |
function _dbg(tag) {
|
| 2440 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2441 |
}
|
| 2442 |
function _holdMove(x, y) {
|
| 2443 |
// hold 진입 후(active)에는 이동으로 취소 안 함 (2배속 중 손가락 미세 떨림 무시).
|
|
|
|
| 2436 |
_dbg('FIRE');
|
| 2437 |
}, HOLD_MS);
|
| 2438 |
}
|
| 2439 |
+
// 진단 로그를 화면 상단에 누적 표시 (한 줄씩 추가, 최근 8개 유지, 8초간 표시).
|
| 2440 |
+
let _dbgBuf = [];
|
| 2441 |
+
let _dbgHideTimer = null;
|
| 2442 |
function _dbg(tag) {
|
| 2443 |
+
const ts = new Date();
|
| 2444 |
+
const t = `${String(ts.getSeconds()).padStart(2,'0')}.${String(ts.getMilliseconds()).padStart(3,'0')}`;
|
| 2445 |
+
_dbgBuf.push(`${t} ${tag}`);
|
| 2446 |
+
if (_dbgBuf.length > 8) _dbgBuf.shift();
|
| 2447 |
+
let el = document.getElementById('_holdDbg');
|
| 2448 |
+
if (!el) {
|
| 2449 |
+
el = document.createElement('div');
|
| 2450 |
+
el.id = '_holdDbg';
|
| 2451 |
+
el.style.cssText = 'position:fixed;top:10px;left:10px;z-index:2147483647;background:rgba(0,0,0,0.75);color:#0f0;font:11px/1.3 monospace;padding:6px 8px;border-radius:4px;white-space:pre;pointer-events:none;max-width:90vw;';
|
| 2452 |
+
document.body.appendChild(el);
|
| 2453 |
+
}
|
| 2454 |
+
el.textContent = _dbgBuf.join('\n');
|
| 2455 |
+
clearTimeout(_dbgHideTimer);
|
| 2456 |
+
_dbgHideTimer = setTimeout(() => { _dbgBuf = []; el.remove(); }, 8000);
|
| 2457 |
}
|
| 2458 |
function _holdMove(x, y) {
|
| 2459 |
// hold 진입 후(active)에는 이동으로 취소 안 함 (2배속 중 손가락 미세 떨림 무시).
|