aboutsummaryrefslogtreecommitdiff
path: root/modern
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-09-08 21:51:27 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2021-09-08 21:51:27 -0700
commitedb24a1bd6649e672bf142b9b873b47dec31f0e3 (patch)
tree6b56579add675a4b0086b57b759b0fd92da7d17f /modern
parent96e785faf6c149b9998c2247039db2dbd00aaf2d (diff)
downloadtrackermap-web-edb24a1bd6649e672bf142b9b873b47dec31f0e3.tar.gz
trackermap-web-edb24a1bd6649e672bf142b9b873b47dec31f0e3.tar.bz2
trackermap-web-edb24a1bd6649e672bf142b9b873b47dec31f0e3.zip
Fix lint issues
Diffstat (limited to 'modern')
-rw-r--r--modern/src/map/mapUtil.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/modern/src/map/mapUtil.js b/modern/src/map/mapUtil.js
index 99109635..2aa86c68 100644
--- a/modern/src/map/mapUtil.js
+++ b/modern/src/map/mapUtil.js
@@ -20,13 +20,13 @@ const canvasTintImage = (image, color) => {
context.fillStyle = color;
context.globalAlpha = 1;
context.fillRect(0, 0, canvas.width, canvas.height);
- context.globalCompositeOperation = "destination-atop";
+ context.globalCompositeOperation = 'destination-atop';
context.globalAlpha = 1;
context.drawImage(image, 0, 0, canvas.width, canvas.height);
context.restore();
return canvas;
-}
+};
export const prepareIcon = (background, icon, color) => {
const canvas = document.createElement('canvas');
@@ -42,7 +42,7 @@ export const prepareIcon = (background, icon, color) => {
const iconRatio = 0.5;
const imageWidth = canvas.width * iconRatio;
const imageHeight = canvas.height * iconRatio;
- if (navigator.userAgent.indexOf("Firefox") > 0) {
+ if (navigator.userAgent.indexOf('Firefox') > 0) {
context.drawImage(icon, (canvas.width - imageWidth) / 2, (canvas.height - imageHeight) / 2, imageWidth, imageHeight);
} else {
context.drawImage(canvasTintImage(icon, color), (canvas.width - imageWidth) / 2, (canvas.height - imageHeight) / 2, imageWidth, imageHeight);