mirror of
https://github.com/FoggedLens/iD.git
synced 2026-04-22 03:36:37 +02:00
Unicode fix for label
This commit is contained in:
+1
-2
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user