From ab6c6411bd8b67e347b4190ad6dc22bbdde1045c Mon Sep 17 00:00:00 2001 From: "hhclaw.eb@gmail.com" Date: Fri, 6 Sep 2013 20:15:01 +0800 Subject: [PATCH] Unicode fix for label --- js/id/svg/labels.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/id/svg/labels.js b/js/id/svg/labels.js index f7d6a5283..72b002e54 100644 --- a/js/id/svg/labels.js +++ b/js/id/svg/labels.js @@ -70,7 +70,6 @@ iD.svg.Labels = function(projection, context) { function textWidth(text, size, elem) { var c = textWidthCache[size]; - var str; if (!c) c = textWidthCache[size] = {}; if (c[text]) { @@ -81,7 +80,7 @@ iD.svg.Labels = function(projection, context) { return c[text]; } else { - str = encodeURIComponent(text).match(/%[CDEFcdef]/g); + var str = encodeURIComponent(text).match(/%[CDEFcdef]/g); if (str == null) { return size / 3 * 2 * text.length; } else {