Set pattern only on enter

This commit is contained in:
John Firebaugh
2013-05-13 21:50:32 -07:00
parent 878a4c0074
commit 29f4006526

View File

@@ -63,17 +63,17 @@ iD.svg.Areas = function(projection) {
.filter(filter)
.data(areas, iD.Entity.key);
paths.enter()
var enter = paths.enter()
.append('path')
.attr('class', function(d) { return d.type + ' area ' + klass + ' ' + d.id; })
.call(iD.svg.TagClasses());
if (klass === 'fill') enter.call(setPattern);
paths
.order()
.attr('d', path);
if (klass === 'fill') paths.call(setPattern);
paths.exit()
.remove();