지표탭 추가 수정

This commit is contained in:
Macbook
2026-05-27 13:16:02 +09:00
parent c72b987ff7
commit f22abbdc19
14 changed files with 505 additions and 76 deletions
+5 -6
View File
@@ -50,7 +50,7 @@ import {
mergeIndicators,
reorderIndicatorGroup,
splitIndicatorPane,
buildIndicatorConfigsFromTypes,
replaceIndicatorConfigsFromTypes,
} from './utils/indicatorPaneMerge';
import { useAppSettings } from './hooks/useAppSettings';
import { clampVirtualTargetMax } from './utils/virtualTargetLimits';
@@ -1368,7 +1368,7 @@ function App() {
});
}, [layoutDef.count, activeSlot, getParams, getVisualConfig]);
/** 지표 추가 팝업 — 탭 전체 추가 (한 번에 상태 반영) */
/** 지표 추가 팝업 — 탭 전체 추가 (기존 보조지표 제거 후 탭 지표만 적용) */
const handleAddIndicators = useCallback((types: string[]) => {
if (!types.length) return;
if (layoutDef.count > 1) {
@@ -1378,10 +1378,9 @@ function App() {
return;
}
}
setIndicators(prev => {
const added = buildIndicatorConfigsFromTypes(types, prev, getParams, getVisualConfig, newIndId);
return added.length > 0 ? [...prev, ...added] : prev;
});
setIndicators(
replaceIndicatorConfigsFromTypes(types, getParams, getVisualConfig, newIndId),
);
}, [layoutDef.count, activeSlot, getParams, getVisualConfig]);
/**