실시간 차트 갱신시 화면떨림 문제 해결

This commit is contained in:
Macbook
2026-05-27 14:54:50 +09:00
parent f7aac535d8
commit 7a0af36b9b
10 changed files with 517 additions and 130 deletions
+19
View File
@@ -202,3 +202,22 @@ export function buildIndicatorConfigsFromTypes(
}
return out;
}
/** id 제거 — 병합 호스트 제거 시 해당 pane 멤버도 함께 제거 */
export function removeIndicatorFromList(
prev: IndicatorConfig[],
id: string,
): IndicatorConfig[] {
return prev.filter(i => i.id !== id && i.mergedWith !== id);
}
/** type 제거 — 해당 type 인스턴스 및 병합 멤버 함께 제거 */
export function removeIndicatorTypeFromList(
prev: IndicatorConfig[],
type: string,
): IndicatorConfig[] {
const removedIds = new Set(prev.filter(i => i.type === type).map(i => i.id));
return prev.filter(
i => i.type !== type && (!i.mergedWith || !removedIds.has(i.mergedWith)),
);
}