kiln / carbonmap.org

http://www.carbonmap.org
7 stars 2 forks source link

The top 18px of the map are not clickable in Safari #24

Closed robinhouston closed 12 years ago

robinhouston commented 12 years ago

Apparently because of the 18px padding on the SVG element. The correct solution is to remove this padding and adjust the SVG viewBox.

robinhouston commented 12 years ago

The viewbox has min-y = -8025154.47184994 and height = 14250308.94369988.

The CSS height is 400px, and the padding was 18px. So we want to adjust both these by 18/400 of the height, which is 641263.9024664946.

Thus we set the height to 14250308.94369988 + 641263.9024664946 = 14891572.8461663746 and the min-y to -8025154.47184994 - 641263.9024664946 = -8666418.3743164346