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:
@ -1276,9 +1276,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style>
|
<link rel="stylesheet" href="./css/indicators-new.css">
|
||||||
@import url(./css/indicators-new.css);
|
|
||||||
</style>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="toolbar">
|
<div class="toolbar">
|
||||||
|
|||||||
@ -32,8 +32,10 @@ const LINE_TYPES = ['solid', 'dotted', 'dashed'];
|
|||||||
|
|
||||||
// Initialize
|
// Initialize
|
||||||
export function initIndicatorPanel() {
|
export function initIndicatorPanel() {
|
||||||
|
console.log('[IndicatorPanel] Initializing...');
|
||||||
renderIndicatorPanel();
|
renderIndicatorPanel();
|
||||||
setupEventListeners();
|
setupEventListeners();
|
||||||
|
console.log('[IndicatorPanel] Initialized');
|
||||||
}
|
}
|
||||||
|
|
||||||
function getDefaultColor(index) {
|
function getDefaultColor(index) {
|
||||||
@ -97,10 +99,16 @@ export function setActiveIndicators(indicators) {
|
|||||||
// Render main panel
|
// Render main panel
|
||||||
export function renderIndicatorPanel() {
|
export function renderIndicatorPanel() {
|
||||||
const container = document.getElementById('indicatorPanel');
|
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 available = getAvailableIndicators();
|
||||||
const catalog = available.filter(ind => {
|
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 (searchQuery && !ind.name.toLowerCase().includes(searchQuery.toLowerCase())) return false;
|
||||||
if (selectedCategory === 'all') return true;
|
if (selectedCategory === 'all') return true;
|
||||||
if (selectedCategory === 'favorites') return false;
|
if (selectedCategory === 'favorites') return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user