로딩처리

This commit is contained in:
Macbook
2026-05-28 01:32:06 +09:00
parent 98dfb3613c
commit aace2282d5
2 changed files with 18 additions and 7 deletions
+8 -7
View File
@@ -9,14 +9,15 @@ import { DISPLAY_COUNT } from '../hooks/useUpbitData';
const MIN_BARS_FOR_FULL_RELOAD = Math.min(50, Math.floor(DISPLAY_COUNT / 4));
function createIndicatorReloadCover(containerEl: HTMLDivElement | null): HTMLDivElement | null {
if (!containerEl) return null;
if (!containerEl?.parentElement) return null;
const cover = document.createElement('div');
cover.style.cssText = [
'position:absolute', 'inset:0', 'z-index:900',
'pointer-events:none', 'opacity:1',
'background:var(--bg,#131722)',
].join(';');
containerEl.parentElement?.appendChild(cover);
cover.className = 'chart-loading chart-indicator-reload-cover';
const spinner = document.createElement('div');
spinner.className = 'loading-spinner';
spinner.setAttribute('role', 'status');
spinner.setAttribute('aria-label', '지표 로딩 중');
cover.appendChild(spinner);
containerEl.parentElement.appendChild(cover);
return cover;
}