보조지표 툴바추가
This commit is contained in:
@@ -2717,27 +2717,28 @@ export class ChartManager {
|
||||
/** 우측 가격축 라벨 영역 클릭 여부 (LWC 축 스케일 드래그에 위임) */
|
||||
isOnPriceAxis(chartX: number, chartY: number): boolean {
|
||||
const paneIndex = this.getPaneIndexAtChartY(chartY);
|
||||
const scaleW = this.getPriceScaleWidth(paneIndex);
|
||||
if (scaleW <= 0) return false;
|
||||
return chartX >= this.container.clientWidth - scaleW;
|
||||
}
|
||||
|
||||
/** pane 우측 가격축(값 라벨) 너비 — PaneLegend 버튼 배치용 */
|
||||
getPriceScaleWidth(paneIndex: number): number {
|
||||
try {
|
||||
const ps = paneIndex === 1
|
||||
? this.chart.priceScale('volume', 1)
|
||||
: this.chart.priceScale('right', paneIndex);
|
||||
const scaleW = ps.width();
|
||||
if (scaleW <= 0) return false;
|
||||
return chartX >= this.container.clientWidth - scaleW;
|
||||
return scaleW > 0 ? scaleW : 56;
|
||||
} catch {
|
||||
return chartX >= this.container.clientWidth - 56;
|
||||
return 56;
|
||||
}
|
||||
}
|
||||
|
||||
/** 캔들 pane(0) 플롯 영역 너비 (우측 가격축 제외) */
|
||||
private _candlePlotWidth(): number {
|
||||
try {
|
||||
const ps = this.mainSeries?.priceScale() ?? this.chart.priceScale('right', 0);
|
||||
const scaleW = ps.width();
|
||||
return Math.max(40, this.container.clientWidth - scaleW);
|
||||
} catch {
|
||||
return Math.max(40, this.container.clientWidth - 56);
|
||||
}
|
||||
const scaleW = this.getPriceScaleWidth(0);
|
||||
return Math.max(40, this.container.clientWidth - scaleW);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user