From 7086012b98bb85badd93b40b34f99e9a14af88a8 Mon Sep 17 00:00:00 2001 From: Ansis Brammanis Date: Tue, 5 Feb 2013 13:05:12 -0500 Subject: [PATCH] Source oneway arrow styles from css --- js/id/svg/lines.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/js/id/svg/lines.js b/js/id/svg/lines.js index 1bfac34b1..a1151204b 100644 --- a/js/id/svg/lines.js +++ b/js/id/svg/lines.js @@ -56,11 +56,13 @@ iD.svg.Lines = function(projection) { } if (!alength) { - var arrow = surface.append('text') - .text(arrowtext) - .style('font-size', 7); + var container = surface.append('g') + .attr('class', 'oneway'), + arrow = container.append('text') + .attr('class', 'textpath') + .text(arrowtext); alength = arrow.node().getComputedTextLength(); - arrow.remove(); + container.remove(); } var lines = [],