Reset temp placement variable each loop iteration

(closes #4473)

Otherwise `if (p)` will have stale data and be truthy for vertices at low zoom
This commit is contained in:
Bryan Housel
2017-11-15 13:47:59 -05:00
parent 3ba25eac52
commit 38920b2c61
+1 -1
View File
@@ -337,7 +337,7 @@ export function svgLabels(projection, context) {
var getName = (geometry === 'line') ? utilDisplayNameForPath : utilDisplayName,
name = getName(entity),
width = name && textWidth(name, fontSize),
p;
p = null;
if (geometry === 'point') {
p = getPointLabel(entity, width, fontSize, geometry);