diff options
author | Iván Ávalos <avalos@disroot.org> | 2021-12-07 15:27:05 -0600 |
---|---|---|
committer | Iván Ávalos <avalos@disroot.org> | 2021-12-07 15:27:05 -0600 |
commit | bbe3e712ef0c616418057f1b9916984da18e7b38 (patch) | |
tree | 439e41d4ab145f7a344190e33928e0e8cbec4a5c /modern/src/map/mapUtil.js | |
parent | 8164e6b30e007a3eeaea25decf98ccb098d9e85f (diff) | |
download | etbsa-traccar-web-bbe3e712ef0c616418057f1b9916984da18e7b38.tar.gz etbsa-traccar-web-bbe3e712ef0c616418057f1b9916984da18e7b38.tar.bz2 etbsa-traccar-web-bbe3e712ef0c616418057f1b9916984da18e7b38.zip |
More rebranding para ETBSA!
Diffstat (limited to 'modern/src/map/mapUtil.js')
-rw-r--r-- | modern/src/map/mapUtil.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modern/src/map/mapUtil.js b/modern/src/map/mapUtil.js index ca7b3af..43038ef 100644 --- a/modern/src/map/mapUtil.js +++ b/modern/src/map/mapUtil.js @@ -36,10 +36,12 @@ export const prepareIcon = (background, icon, color) => { canvas.style.height = `${background.height}px`; const context = canvas.getContext('2d'); - context.drawImage(background, 0, 0, canvas.width, canvas.height); + if (!icon) { + context.drawImage(background, 0, 0, canvas.width, canvas.height); + } if (icon) { - const iconRatio = 0.8; + const iconRatio = 1; const imageWidth = canvas.width * iconRatio; const imageHeight = canvas.height * iconRatio; /*if (navigator.userAgent.indexOf('Firefox') > 0) {*/ |