aboutsummaryrefslogtreecommitdiff
path: root/modern/src/map/mapUtil.js
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/map/mapUtil.js')
-rw-r--r--modern/src/map/mapUtil.js12
1 files changed, 3 insertions, 9 deletions
diff --git a/modern/src/map/mapUtil.js b/modern/src/map/mapUtil.js
index 43038ef..e93c146 100644
--- a/modern/src/map/mapUtil.js
+++ b/modern/src/map/mapUtil.js
@@ -36,19 +36,13 @@ export const prepareIcon = (background, icon, color) => {
canvas.style.height = `${background.height}px`;
const context = canvas.getContext('2d');
- if (!icon) {
- context.drawImage(background, 0, 0, canvas.width, canvas.height);
- }
+ context.drawImage(background, 0, 0, canvas.width, canvas.height);
if (icon) {
- const iconRatio = 1;
+ const iconRatio = 0.7;
const imageWidth = canvas.width * iconRatio;
const imageHeight = canvas.height * iconRatio;
- /*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);
- }*/
+ context.drawImage(icon, (canvas.width - imageWidth) / 2, (canvas.height - imageHeight) / 2, imageWidth, imageHeight);
}
return context.getImageData(0, 0, canvas.width, canvas.height);