From 559d4abf85abc29c0acf34f3c839e305a05569f7 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Mon, 14 Mar 2016 21:25:36 -0400 Subject: [PATCH] Set gpx labels on update selection, not enter selection (closes #3032) --- js/id/svg/gpx.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/id/svg/gpx.js b/js/id/svg/gpx.js index ec94c7821..44625ae87 100644 --- a/js/id/svg/gpx.js +++ b/js/id/svg/gpx.js @@ -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;