diff --git a/js/id/svg/lines.js b/js/id/svg/lines.js index a183f4aea..713432b8b 100644 --- a/js/id/svg/lines.js +++ b/js/id/svg/lines.js @@ -1,10 +1,14 @@ iD.svg.Lines = function() { - return function(surface, graph, entities, filter, projection) { - var arrowtext = '►\u3000\u3000', - arrow = surface.append('text').text(arrowtext), - alength = arrow.node().getComputedTextLength(); - arrow.remove(); + var arrowtext = '►\u3000\u3000', + alength; + + return function(surface, graph, entities, filter, projection) { + if (!alength) { + var arrow = surface.append('text').text(arrowtext); + alength = arrow.node().getComputedTextLength(); + arrow.remove(); + } var lines = [];