일목균형표 구름 디버그 로그 추가 (임시)
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -66,7 +66,11 @@ class CloudRenderer implements IPrimitivePaneRenderer {
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
draw(target: any): void {
|
||||
if (this._data.length < 2) return;
|
||||
if (this._data.length < 2) {
|
||||
console.log('[IchimokuCloud] draw: skipped, data.length=', this._data.length);
|
||||
return;
|
||||
}
|
||||
console.log('[IchimokuCloud] draw called. data.length:', this._data.length, 'bullish:', this._bullishVisible, 'bearish:', this._bearishVisible);
|
||||
const timeScale = this._chart.timeScale();
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
@@ -141,14 +145,17 @@ export class IchimokuCloudPlugin implements ISeriesPrimitive<Time> {
|
||||
this._chart = chart;
|
||||
this._series = series;
|
||||
this._updateFn = requestUpdate;
|
||||
console.log('[IchimokuCloud] attached. series:', !!series, 'chart:', !!chart);
|
||||
}
|
||||
|
||||
detached(): void {
|
||||
console.log('[IchimokuCloud] detached. data.length:', this._data.length);
|
||||
this._chart = null;
|
||||
this._series = null;
|
||||
}
|
||||
|
||||
setCloudData(data: IchimokuCloudPoint[]): void {
|
||||
console.log('[IchimokuCloud] setCloudData:', data.length, 'points, chart:', !!this._chart, 'series:', !!this._series, 'updateFn:', !!this._updateFn);
|
||||
this._data = data;
|
||||
this._updateFn?.();
|
||||
}
|
||||
@@ -171,7 +178,10 @@ export class IchimokuCloudPlugin implements ISeriesPrimitive<Time> {
|
||||
getBearishVisible() { return this._bearishVisible; }
|
||||
|
||||
paneViews(): readonly IPrimitivePaneView[] {
|
||||
if (!this._chart || !this._series) return [];
|
||||
if (!this._chart || !this._series) {
|
||||
console.warn('[IchimokuCloud] paneViews: chart or series is null → returning []');
|
||||
return [];
|
||||
}
|
||||
return [new CloudPaneView(this)];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user