fix: remove large console logs

This commit is contained in:
2026-02-04 19:04:52 +05:00
parent 6975c5b523
commit c098c21077
3 changed files with 5 additions and 23 deletions
+3 -10
View File
@@ -18,27 +18,20 @@
}
$effect(() => {
console.log(
"[PanelPreview] Effect triggered. Panel background:",
panel?.backgroundImage,
"Current image src:",
backgroundImage?.src,
);
if (panel?.backgroundImage && panel.backgroundImage !== backgroundImage?.src) {
console.log("[PanelPreview] Loading new background image:", panel.backgroundImage);
loadImage(panel.backgroundImage);
}
});
function loadImage(src: string) {
console.log("[PanelPreview] Starting to load image:", src);
// Remove verbose logging - image data is too large for console
console.log("[PanelPreview] Loading background image");
const img = document.createElement("img");
img.onload = () => {
console.log("[PanelPreview] Image loaded successfully:", src);
backgroundImage = img;
};
img.onerror = (error) => {
console.error("[PanelPreview] Failed to load image:", src, error);
console.error("[PanelPreview] Failed to load background image");
};
img.src = src;
}