일목균형표 구름 미표시 버그 수정 (bullishVisible/bearishVisible 둘 다 false)
- isIchimokuCloudVisible: bullish/bearish 둘 다 false이면 DB 잘못된 저장값으로 간주하고 구름을 표시 (하나만 false인 경우는 사용자 의도로 유지) - _applyIchimokuCloudPlugin: 동일 로직으로 effectiveBullish/effectiveBearish 적용 - config.hidden 체크로만 클라우드 데이터 초기화 - isIchimokuCloudVisible 의존 제거 서버 DB에 cloudColors.bullishVisible=false, bearishVisible=false 가 잘못 저장된 경우에도 구름이 표시되도록 보호 로직 추가. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1751,10 +1751,18 @@ export class ChartManager {
|
||||
config: IndicatorConfig,
|
||||
): void {
|
||||
const colors = resolveIchimokuCloudColors(config.cloudColors);
|
||||
plugin.setColors(colors.bullishColor, colors.bearishColor);
|
||||
plugin.setVisibility(colors.bullishVisible !== false, colors.bearishVisible !== false);
|
||||
|
||||
if (!isIchimokuCloudVisible(config)) {
|
||||
// bullishVisible/bearishVisible 가 둘 다 false 이면 DB 잘못된 저장값으로 간주하고
|
||||
// 기본값(표시)으로 복원한다. 하나만 false 인 경우는 사용자 의도이므로 유지.
|
||||
const bullishVis = colors.bullishVisible !== false;
|
||||
const bearishVis = colors.bearishVisible !== false;
|
||||
const effectiveBullish = (!bullishVis && !bearishVis) ? true : bullishVis;
|
||||
const effectiveBearish = (!bullishVis && !bearishVis) ? true : bearishVis;
|
||||
|
||||
plugin.setColors(colors.bullishColor, colors.bearishColor);
|
||||
plugin.setVisibility(effectiveBullish, effectiveBearish);
|
||||
|
||||
if (config.hidden === true) {
|
||||
plugin.setCloudData([]);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user