전략평가 화면 수정
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user