Skip to content

Commit dd637e9

Browse files
committed
Update app.js
1 parent be9adc7 commit dd637e9

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

app.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2482,16 +2482,9 @@ function renderElements() {
24822482
const w = Math.max(1, Math.round(el.w));
24832483
const h = Math.max(1, Math.round(el.h));
24842484

2485+
// IMPORTANT: In OLED mode, icons/images are rendered via normal DOM elements (not the pixel canvas).
2486+
// This prevents CORS/tainted-canvas issues and matches the UX request ("icons don't need to be pixelated").
24852487
if (el.type === "image" || el.type === "icon") {
2486-
const src = el.type === "icon" ? el.iconSrc : el.previewUrl;
2487-
if (src) {
2488-
if (el.type === "icon") {
2489-
// Icons: tint by alpha mask (works even if the PNG itself is dark)
2490-
drawOledIconAlphaMask(ctx, src, x, y, w, h, textColor);
2491-
} else {
2492-
drawOledThresholdedImage(ctx, src, x, y, w, h, textColor);
2493-
}
2494-
}
24952488
return;
24962489
}
24972490

0 commit comments

Comments
 (0)