Permalink
Browse files

Fix bug in compass zoom positioning.

  • Loading branch information...
mbostock committed Jan 19, 2011
1 parent 41e4780 commit 7c33adec97335464ed7d243268bd78c819e3751f
Showing with 36 additions and 38 deletions.
  1. +2 −3 polymaps.js
  2. +32 −32 polymaps.min.js
  3. +2 −3 src/Compass.js
View
@@ -2028,9 +2028,8 @@ po.compass = function() {
case "bottom-left": y = size.y - y; break;
case "bottom-right": x = size.x - x; y = size.y - y; break;
}
- var tx = "translate(" + x + "," + y + ")";
- if (panContainer) panContainer.setAttribute("transform", tx);
- if (zoomContainer) zoomContainer.setAttribute("transform", tx);
+ g.setAttribute("transform", "translate(" + x + "," + y + ")");
+ dragRect.setAttribute("transform", "translate(" + -x + "," + -y + ")");
for (var i in ticks) {
i == map.zoom()
? ticks[i].setAttribute("class", "active")
Oops, something went wrong.

0 comments on commit 7c33ade

Please sign in to comment.