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:
John Firebaugh
2013-05-24 11:26:12 -07:00
parent 5868875833
commit 8f272f2508
3 changed files with 7 additions and 2 deletions
+1
View File
@@ -4489,6 +4489,7 @@
},
"type/multipolygon": {
"geometry": [
"area",
"relation"
],
"tags": {
@@ -1,5 +1,6 @@
{
"geometry": [
"area",
"relation"
],
"tags": {
+5 -2
View File
@@ -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;