mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-20 23:44:47 +02:00
Special case multipolygon preset icon
Multipolygons have geometry === "area", so normally wouldn't trigger a 'preset-icon-relation' class. This preset usually matches only in the case where the tags are on the outer way and the multipolygon itself is untagged. Otherwise, a more specific area preset will match.
This commit is contained in:
@@ -4489,6 +4489,7 @@
|
||||
},
|
||||
"type/multipolygon": {
|
||||
"geometry": [
|
||||
"area",
|
||||
"relation"
|
||||
],
|
||||
"tags": {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"geometry": [
|
||||
"area",
|
||||
"relation"
|
||||
],
|
||||
"tags": {
|
||||
|
||||
@@ -16,9 +16,12 @@ iD.ui.PresetIcon = function(geometry) {
|
||||
var icon = preset.icon || fallbackIcon,
|
||||
klass = 'feature-' + icon + ' preset-icon';
|
||||
|
||||
icon = iD.data.featureIcons[icon];
|
||||
if (icon && icon[geometry]) {
|
||||
var featureicon = iD.data.featureIcons[icon];
|
||||
if (featureicon && featureicon[geometry]) {
|
||||
klass += ' preset-icon-' + geometry;
|
||||
} else if (icon === 'multipolygon') {
|
||||
// Special case (geometry === 'area')
|
||||
klass += ' preset-icon-relation';
|
||||
}
|
||||
|
||||
return klass;
|
||||
|
||||
Reference in New Issue
Block a user