From 7e9eaa64229c62677eaf45ed77196fc57fa8a0ce Mon Sep 17 00:00:00 2001 From: Ansis Brammanis Date: Fri, 11 Jan 2013 15:57:28 -0500 Subject: [PATCH] fix svg line text --- js/id/svg/lines.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/id/svg/lines.js b/js/id/svg/lines.js index 0ca75594c..a183f4aea 100644 --- a/js/id/svg/lines.js +++ b/js/id/svg/lines.js @@ -1,6 +1,7 @@ iD.svg.Lines = function() { return function(surface, graph, entities, filter, projection) { - var arrow = surface.append('text').text('►----'), + var arrowtext = '►\u3000\u3000', + arrow = surface.append('text').text(arrowtext), alength = arrow.node().getComputedTextLength(); arrow.remove(); @@ -84,7 +85,8 @@ iD.svg.Lines = function() { .filter(filter) .attr('xlink:href', function(d, i) { return '#shadow-' + d.id; }) .text(function(d) { - return (new Array(Math.floor(lengths[d.id]))).join('►  '); + // adding longer text than necessary, since overflow is hidden + return (new Array(Math.floor(lengths[d.id] * 1.1))).join(arrowtext); }); } };