전략평가 화면 수정

This commit is contained in:
Macbook
2026-06-12 15:22:48 +09:00
parent 7579ed9de4
commit 8aae8489ae
8 changed files with 298 additions and 152 deletions
@@ -69,6 +69,20 @@ function indexFromClientX(
return findNearestBarIndex(bars, time);
}
/** 캔들 pane 클릭 좌표 → 봉 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 StrategyEvaluationBarSelector: React.FC<Props> = ({
manager,
bars,