Fix CSS import and add debug logging for indicator panel
- Changed @import style to proper <link> tag for indicators-new.css - Added console logging to initIndicatorPanel for debugging - Added console logging to renderIndicatorPanel to show filter results - This should help diagnose empty panel issue
This commit is contained in:
@ -32,8 +32,10 @@ const LINE_TYPES = ['solid', 'dotted', 'dashed'];
|
||||
|
||||
// Initialize
|
||||
export function initIndicatorPanel() {
|
||||
console.log('[IndicatorPanel] Initializing...');
|
||||
renderIndicatorPanel();
|
||||
setupEventListeners();
|
||||
console.log('[IndicatorPanel] Initialized');
|
||||
}
|
||||
|
||||
function getDefaultColor(index) {
|
||||
@ -97,10 +99,16 @@ export function setActiveIndicators(indicators) {
|
||||
// Render main panel
|
||||
export function renderIndicatorPanel() {
|
||||
const container = document.getElementById('indicatorPanel');
|
||||
if (!container) return;
|
||||
if (!container) {
|
||||
console.error('[IndicatorPanel] Container #indicatorPanel not found!');
|
||||
return;
|
||||
}
|
||||
|
||||
console.log('[IndicatorPanel] Rendering panel, searchQuery:', searchQuery, 'selectedCategory:', selectedCategory);
|
||||
|
||||
const available = getAvailableIndicators();
|
||||
const catalog = available.filter(ind => {
|
||||
console.log("[IndicatorPanel] Total indicators:", available.length, "Filtered to:", catalog.length);
|
||||
if (searchQuery && !ind.name.toLowerCase().includes(searchQuery.toLowerCase())) return false;
|
||||
if (selectedCategory === 'all') return true;
|
||||
if (selectedCategory === 'favorites') return false;
|
||||
|
||||
Reference in New Issue
Block a user