From f4d8a835403b59d909e780d5fe9634a984249478 Mon Sep 17 00:00:00 2001 From: flatline Date: Wed, 10 Jun 2015 08:41:39 -0600 Subject: [PATCH] Add var declaration to avoid global variable scope --- lib/label/add-label.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/label/add-label.js b/lib/label/add-label.js index 9bd5d3a8..64467628 100644 --- a/lib/label/add-label.js +++ b/lib/label/add-label.js @@ -19,6 +19,7 @@ function addLabel(root, node, location) { } var labelBBox = labelSvg.node().getBBox(); + var y; switch(location) { case "top": y = (-node.height / 2);