diff options
author | Iván Ávalos <avalos@disroot.org> | 2021-12-08 22:51:16 -0600 |
---|---|---|
committer | Iván Ávalos <avalos@disroot.org> | 2021-12-08 22:51:16 -0600 |
commit | 982dec21075a244a0c75ee11c13777d6931e21ec (patch) | |
tree | e211e1e252b8d5757693e43bf98758b9a139847d /modern/src/map | |
parent | 3dcc6be877f8f43bd9c7e1eee1ad6d7950b435a5 (diff) | |
download | etbsa-traccar-web-982dec21075a244a0c75ee11c13777d6931e21ec.tar.gz etbsa-traccar-web-982dec21075a244a0c75ee11c13777d6931e21ec.tar.bz2 etbsa-traccar-web-982dec21075a244a0c75ee11c13777d6931e21ec.zip |
Adjusted media queries, and device color = gray when ignition is undefined
Diffstat (limited to 'modern/src/map')
-rw-r--r-- | modern/src/map/Map.js | 2 | ||||
-rw-r--r-- | modern/src/map/PositionsMap.js | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/modern/src/map/Map.js b/modern/src/map/Map.js index 63e3a73..d02fae1 100644 --- a/modern/src/map/Map.js +++ b/modern/src/map/Map.js @@ -44,7 +44,7 @@ const initMap = async () => { if (ready) return; if (!map.hasImage('background')) { const background = await loadImage('images/background.svg'); - map.addImage('background', await prepareIcon(background), { + map.addImage('background', prepareIcon(background), { pixelRatio: window.devicePixelRatio, }); await Promise.all(deviceCategories.map(async (category) => { diff --git a/modern/src/map/PositionsMap.js b/modern/src/map/PositionsMap.js index f69b541..ba23289 100644 --- a/modern/src/map/PositionsMap.js +++ b/modern/src/map/PositionsMap.js @@ -22,6 +22,8 @@ const PositionsMap = ({ positions }) => { if (position) { if (position.attributes.ignition) { return 'green'; + } else if (position.attributes.ignition == undefined) { + return 'gray'; } else { return 'red'; } |