실시간 차트 보조지표 탭 문제 수정

This commit is contained in:
Macbook
2026-05-28 01:26:53 +09:00
parent 4f6694b206
commit 98dfb3613c
19 changed files with 801 additions and 182 deletions
+15
View File
@@ -19,6 +19,21 @@ export function singleIndParamKey(i: IndicatorConfig): string {
return `${JSON.stringify(i.params)}|${(i.plots ?? []).map(p => p.id).sort().join(',')}|${i.mergedWith ?? ''}`;
}
/** 차트에 로드된 지표 id 중 현재 설정에 없는(이전 탭 잔존) 항목이 있는지 */
export function chartHasStaleIndicators(
loadedIds: Set<string>,
indicators: IndicatorConfig[],
): boolean {
if (loadedIds.size === 0) return false;
const expected = new Set(
indicators.filter(i => i.hidden !== true).map(i => i.id),
);
for (const id of loadedIds) {
if (!expected.has(id)) return true;
}
return false;
}
/** 이전·현재 지표 목록 차이를 분류해 최소 갱신 경로를 선택 */
export function classifyIndicatorChartChange(
prev: IndicatorConfig[],