실시간 차트 갱신시 화면떨림 문제 해결
This commit is contained in:
@@ -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)),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user