mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-14 01:33:03 +00:00
Make tag classes functions non-anonymous
This commit is contained in:
@@ -4,8 +4,8 @@ iD.svg.TagClasses = function() {
|
||||
'landuse', 'building', 'oneway', 'bridge'
|
||||
]), tagClassRe = /^tag-/;
|
||||
|
||||
return function(selection) {
|
||||
selection.each(function(d, i) {
|
||||
return function tagClassesSelection(selection) {
|
||||
selection.each(function tagClassesEach(d, i) {
|
||||
var classes, value = this.className;
|
||||
|
||||
if (value.baseVal !== undefined) value = value.baseVal;
|
||||
@@ -21,7 +21,7 @@ iD.svg.TagClasses = function() {
|
||||
classes.push('tag-' + k + '-' + tags[k]);
|
||||
}
|
||||
|
||||
return d3.select(this).attr('class', classes.join(' '));
|
||||
return this.className = classes.join(' ');
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user