전략평가 화면 수정

This commit is contained in:
Macbook
2026-06-12 18:13:25 +09:00
parent b560b9de5c
commit a3f0584e72
13 changed files with 742 additions and 106 deletions
@@ -69,18 +69,16 @@ function indexFromClientX(
return findNearestBarIndex(bars, time);
}
/** 캔들 pane 클릭 좌표 → 봉 index (전략선택봉 이동) */
/** 차트 클릭 좌표 → 봉 index (전략선택봉 이동, 전략선택봉 영역 제외는 호출측) */
export function resolveBarIndexAtChartClick(
manager: ChartManager,
bars: OHLCVBar[],
clientX: number,
clientY: number,
): number {
const rect = manager.getContainer().getBoundingClientRect();
const clickY = clientY - rect.top;
const main = manager.getPaneLayouts().find(l => l.paneIndex === 0);
if (!main || clickY < main.topY || clickY >= main.topY + main.height) return -1;
return indexFromClientX(manager, bars, clientX);
const idx = manager.resolveNearestBarIndexAtClientPoint(clientX, clientY);
if (idx < 0 || idx >= bars.length) return -1;
return idx;
}
const StrategyEvaluationBarSelector: React.FC<Props> = ({