From 9fefd1847a184d452a32fd571a36c5749a7b544d Mon Sep 17 00:00:00 2001 From: DiTus Date: Sat, 21 Mar 2026 23:47:27 +0100 Subject: [PATCH] fix: Show Text tab for horizontal and vertical line settings --- js/ui/drawing-tools.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/ui/drawing-tools.js b/js/ui/drawing-tools.js index f7ed600..6ae7687 100644 --- a/js/ui/drawing-tools.js +++ b/js/ui/drawing-tools.js @@ -1193,7 +1193,7 @@ export class DrawingManager { window.switchTLTab = (tab) => { this.activeTLTab = tab; - const isLineWithText = this.selectedDrawing && ['trend_line', 'ray', 'rectangle'].includes(this.selectedDrawing.type); + const isLineWithText = this.selectedDrawing && ['trend_line', 'ray', 'rectangle', 'horizontal_line', 'vertical_line'].includes(this.selectedDrawing.type); document.getElementById('tlTabStyle').className = tab === 'style' ? 'flex-1 py-2 text-center text-blue-500 border-b-2 border-blue-500 font-medium' : 'flex-1 py-2 text-center text-gray-400 hover:text-white'; @@ -1217,11 +1217,11 @@ export class DrawingManager { window.setTLThickness = (width) => this.applySettings('width', width); window.setTLStyle = (style) => this.applySettings('style', style); window.toggleTLBold = () => { - const current = this.selectedDrawing && ['trend_line', 'ray', 'rectangle'].includes(this.selectedDrawing.type) ? this.selectedDrawing.bold : this.defaults.trend_line.bold; + const current = this.selectedDrawing && ['trend_line', 'ray', 'rectangle', 'horizontal_line', 'vertical_line'].includes(this.selectedDrawing.type) ? this.selectedDrawing.bold : this.defaults.trend_line.bold; this.applySettings('bold', !current); }; window.toggleTLItalic = () => { - const current = this.selectedDrawing && ['trend_line', 'ray', 'rectangle'].includes(this.selectedDrawing.type) ? this.selectedDrawing.italic : this.defaults.trend_line.italic; + const current = this.selectedDrawing && ['trend_line', 'ray', 'rectangle', 'horizontal_line', 'vertical_line'].includes(this.selectedDrawing.type) ? this.selectedDrawing.italic : this.defaults.trend_line.italic; this.applySettings('italic', !current); }; @@ -1314,7 +1314,7 @@ export class DrawingManager { if (show) { panel.classList.remove('hidden'); - const isLineWithText = this.selectedDrawing && ['trend_line', 'ray', 'rectangle'].includes(this.selectedDrawing.type); + const isLineWithText = this.selectedDrawing && ['trend_line', 'ray', 'rectangle', 'horizontal_line', 'vertical_line'].includes(this.selectedDrawing.type); if (!isLineWithText) { this.activeTLTab = 'style'; document.getElementById('tlTabStyle').className = 'flex-1 py-2 text-center text-blue-500 border-b-2 border-blue-500 font-medium';