Set gpx labels on update selection, not enter selection

(closes #3032)
This commit is contained in:
Bryan Housel
2016-03-14 21:25:36 -04:00
parent e1cde03a95
commit 559d4abf85
+4 -4
View File
@@ -68,15 +68,15 @@ iD.svg.Gpx = function(projection, context, dispatch) {
labels.enter()
.append('text')
.attr('class', 'gpx')
.text(function(d) {
return d.properties.desc || d.properties.name;
});
.attr('class', 'gpx');
labels.exit()
.remove();
labels
.text(function(d) {
return d.properties.desc || d.properties.name;
})
.attr('x', function(d) {
var centroid = path.centroid(d);
return centroid[0] + 7;