aboutsummaryrefslogtreecommitdiff
path: root/src/map/core/mapUtil.js
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 /src/map/core/mapUtil.js
parent6293760f15d46eadc4d6ea444f2426a8ff66f09a (diff)
downloadtrackermap-web-1c257cc26f38258d7aa0404cbc4aee9a83813e09.tar.gz
trackermap-web-1c257cc26f38258d7aa0404cbc4aee9a83813e09.tar.bz2
trackermap-web-1c257cc26f38258d7aa0404cbc4aee9a83813e09.zip
Do not tint device icons
Diffstat (limited to 'src/map/core/mapUtil.js')
-rw-r--r--src/map/core/mapUtil.js3
1 files changed, 2 insertions, 1 deletions
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);