fix missing vertex icon, improve fallback icons for untagged objects

closes #9157
This commit is contained in:
Martin Raifer
2022-06-20 11:19:59 +02:00
parent d0b1fb1ebe
commit 69edff39f0
2 changed files with 5 additions and 2 deletions
+2
View File
@@ -55,6 +55,7 @@ _Breaking developer changes, which may affect downstream projects or sites that
#### :rocket: Presets
* Disable taginfo suggestions for the `via` field ([#9140], thanks [@k-yle])
* Treat `surface=chipseal` as a paved surface ([#9139], thanks [@k-yle])
* Better fallback icons for untagged points, vertices, lines and areas ([#9157])
#### :hammer: Development
@@ -68,6 +69,7 @@ _Breaking developer changes, which may affect downstream projects or sites that
[#9139]: https://github.com/openstreetmap/iD/pull/9139
[#9140]: https://github.com/openstreetmap/iD/pull/9140
[#9142]: https://github.com/openstreetmap/iD/pull/9142
[#9157]: https://github.com/openstreetmap/iD/issues/9157
[@furkanmutlu]: https://github.com/furkanmutlu
[@JackNUMBER]: https://github.com/JackNUMBER
[@aaditya0000]: https://github.com/aaditya0000
+3 -2
View File
@@ -17,9 +17,10 @@ export function uiPresetIcon() {
function getIcon(p, geom) {
if (p.isFallback && p.isFallback()) return geom === 'vertex' ? '' : 'iD-icon-' + p.id;
if (p.icon) return p.icon;
if (geom === 'line') return 'iD-other-line';
if (geom === 'vertex') return p.isFallback() ? '' : 'temaki-vertex';
if (geom === 'vertex') return 'temaki-vertex';
return 'maki-marker-stroked';
}
@@ -386,7 +387,7 @@ export function uiPresetIcon() {
const picon = getIcon(p, geom);
const isCategory = !p.setTags;
const drawPoint = false;
const drawVertex = picon !== null && geom === 'vertex' && (!isFallback);
const drawVertex = picon !== null && geom === 'vertex';
const drawLine = picon && geom === 'line' && !isFallback && !isCategory;
const drawArea = picon && geom === 'area' && !isFallback && !isCategory;
const drawRoute = picon && geom === 'route';