resolved conflicts.

This commit is contained in:
Saman Bemel-Benrud
2013-02-20 18:01:31 -05:00
5 changed files with 71 additions and 6 deletions
+33 -1
View File
@@ -658,6 +658,16 @@ a.selected:hover .toggle.icon { background-position: -40px -180px;}
position: absolute;
}
.grid-entry .preset-icon-fill.area {
position: absolute;
opacity: 0.4;
left: 0; right: 0; top: 0; bottom: 0;
border-radius: 4px;
margin: auto;
width: 40px;
height: 40px;
}
.grid-entry .icon {
position: absolute;
top: 20%;left: 0; right: 0;
@@ -685,8 +695,30 @@ a.selected:hover .toggle.icon { background-position: -40px -180px;}
height: 20px;
}
/* Preset form */
/* Preset icon colors */
.preset-icon-fill.tag-amenity,
.preset-icon-fill.tag-shop,
.preset-icon-fill.tag-building {
background-color: #e06e5f;
}
.preset-icon-fill.tag-natural-water {
background-color: #77d3de;
}
.preset-icon-fill.tag-landuse,
.preset-icon-fill.tag-natural-wood,
.preset-icon-fill.tag-natural-tree,
.preset-icon-fill.tag-natural-grassland,
.preset-icon-fill.tag-leisure-park {
background-color: #8cd05f;
}
.preset-icon-fill.tag-amenity-parking {
background-color: #aaa;
}
/* Map Controls */
+1
View File
@@ -125,6 +125,7 @@ iD.modes.Select = function(context, selection, initial) {
if (!_.isEqual(entity.tags, newEntity.tags)) {
inspector.tags(newEntity.tags);
}
entity = newEntity;
}
});
+10
View File
@@ -53,8 +53,18 @@ iD.ui.PresetGrid = function() {
event.choose(d);
});
entered.append('div')
.attr('class', function(d) {
var s = 'preset-icon-fill ' + entity.geometry(context.graph());
for (var i in d.match.tags) {
s += ' tag-' + i + ' tag-' + i + '-' + d.match.tags[i];
}
return s;
});
entered.append('div')
.attr('class', function(d) { return 'maki-' + d.icon + '-24 icon'; });
entered.append('span').attr('class','label').text(name);
entries.exit().remove();
+3 -5
View File
@@ -5,6 +5,7 @@ iD.ui.TagEditor = function() {
inspectorbody,
entity,
tags,
name,
presetMatch,
presetUI,
presetGrid,
@@ -40,10 +41,6 @@ iD.ui.TagEditor = function() {
event.choose();
});
// typewrap.append('em')
// .attr('class', 'preset-geometry')
// .text(entity.geometry(context.graph()));
typelabel.append('div')
.attr('class', 'icon icon-pre-text' + (presetMatch ? ' maki-' + presetMatch.icon + '-24' : ''));
@@ -69,7 +66,7 @@ iD.ui.TagEditor = function() {
.property('value', function() {
return entity.tags.name || '';
})
.on('keyup', function() {
.on('blur', function() {
var tags = tageditor.tags();
tags.name = this.value;
tageditor.tags(tags);
@@ -134,6 +131,7 @@ iD.ui.TagEditor = function() {
} else {
tags = newtags;
if (presetUI && tagList) {
name.property('value', tags.name || '');
presetUI.change(tags);
tagList.tags(_.omit(tags, _.keys(presetUI.tags() || {})));
}
+24
View File
@@ -26,6 +26,30 @@
}
]
},
{
"title": "Park",
"name": "park",
"match": {
"type": ["node", "area"],
"tags": {
"leisure": "park"
}
},
"icon": "park",
"form": []
},
{
"title": "Water",
"name": "water",
"match": {
"type": ["node", "area"],
"tags": {
"natural": "water"
}
},
"icon": "",
"form": []
},
{
"title": "Supermarket",
"name": "supermarket",