use road category, and other line icons

This commit is contained in:
Ansis Brammanis
2013-03-21 11:57:00 -04:00
parent e96bb2eae0
commit cdfd5dfc27
6 changed files with 294 additions and 285 deletions
+4 -1
View File
@@ -276,9 +276,12 @@ iD.ui.PresetGrid = function(context, entity) {
entered.append('div')
.attr('class', presetClass);
var geometry = entity.geometry(context.graph()),
fallbackIcon = geometry === 'line' ? 'other-line' : 'marker-stroked';
entered.append('div')
.attr('class', function(d) {
return 'feature-' + (d.icon || 'marker-stroked') + ' icon';
return 'feature-' + (d.icon || fallbackIcon) + ' icon';
});
entered.append('span')
+3 -1
View File
@@ -35,10 +35,12 @@ iD.ui.TagEditor = function(context, entity) {
event.choose(preset);
});
var fallbackIcon = geometry === 'line' ? 'other-line' : 'marker-stroked';
back.append('div')
.attr('class', 'col12')
.append('span')
.attr('class', 'preset-icon icon' + (preset ? ' feature-' + (preset.icon || 'marker-stroked') : ''));
.attr('class', 'preset-icon icon' + (preset ? ' feature-' + (preset.icon || fallbackIcon) : ''));
back.append('div')
.attr('class', 'col12')