로딩처리
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user