aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2024-04-20 13:35:22 -0600
committerIván Ávalos <avalos@disroot.org>2024-04-20 13:35:22 -0600
commit1c257cc26f38258d7aa0404cbc4aee9a83813e09 (patch)
tree6c140aadca56604e2a16b2645ace011b2e79d762
parent6293760f15d46eadc4d6ea444f2426a8ff66f09a (diff)
downloadtrackermap-web-1c257cc26f38258d7aa0404cbc4aee9a83813e09.tar.gz
trackermap-web-1c257cc26f38258d7aa0404cbc4aee9a83813e09.tar.bz2
trackermap-web-1c257cc26f38258d7aa0404cbc4aee9a83813e09.zip
Do not tint device icons
-rw-r--r--src/main/DeviceRow.jsx3
-rw-r--r--src/map/core/mapUtil.js3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/main/DeviceRow.jsx b/src/main/DeviceRow.jsx
index 8399da22..2eb3d6cd 100644
--- a/src/main/DeviceRow.jsx
+++ b/src/main/DeviceRow.jsx
@@ -133,7 +133,8 @@ const DeviceRow = ({ data, index, style }) => {
>
<ListItemAvatar>
<Avatar>
- <img className={classes.icon} src={mapIcons[mapIconKey(item.category)]} alt="" />
+ {/* RATIONALE: png icons (which we use sometimes) are not to be tinted! */}
+ <img src={mapIcons[mapIconKey(item.category)]} alt="" />
</Avatar>
</ListItemAvatar>
<ListItemText
diff --git a/src/map/core/mapUtil.js b/src/map/core/mapUtil.js
index 8dcded2c..5cb0ef0d 100644
--- a/src/map/core/mapUtil.js
+++ b/src/map/core/mapUtil.js
@@ -42,7 +42,8 @@ export const prepareIcon = (background, icon, color) => {
const iconRatio = 0.5;
const imageWidth = canvas.width * iconRatio;
const imageHeight = canvas.height * iconRatio;
- context.drawImage(canvasTintImage(icon, color), (canvas.width - imageWidth) / 2, (canvas.height - imageHeight) / 2, imageWidth, imageHeight);
+ // RATIONALE: png icons (which we use sometimes) are not to be tinted!
+ context.drawImage(icon, (canvas.width - imageWidth) / 2, (canvas.height - imageHeight) / 2, imageWidth, imageHeight);
}
return context.getImageData(0, 0, canvas.width, canvas.height);