From 4c057a3e07df789e5d645d46726062111add4352 Mon Sep 17 00:00:00 2001 From: Macbook Date: Sat, 6 Jun 2026 03:15:07 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B0=B1=ED=85=8C=EC=8A=A4=ED=8C=85=20?= =?UTF-8?q?=EB=B3=B4=EC=A1=B0=EC=A7=80=ED=91=9C=20=EC=B0=A8=ED=8A=B8?= =?UTF-8?q?=EB=AA=85=20=EC=95=88=EB=82=98=EC=98=A4=EB=8A=94=20=EB=AC=B8?= =?UTF-8?q?=EC=A0=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/utils/ChartManager.ts | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/frontend/src/utils/ChartManager.ts b/frontend/src/utils/ChartManager.ts index 011d0c9..a4e81e5 100644 --- a/frontend/src/utils/ChartManager.ts +++ b/frontend/src/utils/ChartManager.ts @@ -2354,13 +2354,20 @@ export class ChartManager { */ getIndicatorPaneScreenLayout(id: string): { topY: number; height: number } | null { const entry = this.indicators.get(id); - if (!entry || entry.paneIndex == null || entry.paneIndex < 2) return null; + if (!entry || entry.paneIndex == null) return null; + /* pane 0 = 메인 캔들차트 → 제외. + * volumeVisible=false 시 볼륨 패인(1)이 없어 RSI 가 LWC pane 1 에 배치되는 경우를 + * _resyncIndicatorPaneIndices() 가 entry.paneIndex=1 로 갱신하므로, + * 기존 < 2 가드 대신 === 0 가드로 완화한다. */ + if (entry.paneIndex === 0) return null; const containerRect = this.container.getBoundingClientRect(); const MIN_H = 4; for (const series of entry.seriesList) { try { - const el = series.getPane().getHTMLElement(); + const pane = series.getPane(); + if (pane.paneIndex() === 0) continue; // 메인 캔들 패인 제외 + const el = pane.getHTMLElement(); if (!el) continue; const rect = el.getBoundingClientRect(); const height = Math.round(rect.height); @@ -2373,6 +2380,14 @@ export class ChartManager { /* try next series */ } } + + /* series.getPane().getHTMLElement() 이 null 반환 시 (compactPaneLayout 등) + * getPaneLayouts() 의 fallback 추정값으로 대체 */ + const paneLayout = this.getPaneLayouts().find(l => l.paneIndex === entry.paneIndex); + if (paneLayout && paneLayout.height >= MIN_H) { + return { topY: paneLayout.topY, height: paneLayout.height }; + } + return null; }