simplegeo / polymaps

Polymaps is a free JavaScript library for making dynamic, interactive maps in modern web browsers.
http://polymaps.org/
Other
1.6k stars 213 forks source link

zoom center is broken when page is scrolled in WebKit #15

Closed RandomEtc closed 14 years ago

RandomEtc commented 14 years ago

If the map is still visible but the page is scrolled, the mouse wheel zoom center is offset.

RandomEtc commented 14 years ago

This is the bug I thought was in Firefox, but Firefox turns out to be OK. I'm testing in Safari 5.0.1 (6533.17.8)

mbostock commented 14 years ago

It should be broken in Firefox too. We are using clientX/clientY in map.mouse, and should be using pageX/pageY.

mbostock commented 14 years ago

Actually SVGLocatable.getScreenCTM should be operating in the same coordinate space as clientX and clientY, so this may in fact be a bug in Safari.

mbostock commented 14 years ago

https://bugs.webkit.org/show_bug.cgi?id=44083

mbostock commented 14 years ago

This bug has now been fixed in WebKit, and I've implemented a workaround for earlier versions:

http://github.com/mbostock/polymaps/commit/86a1b8a3814ab843f84a12cf49911ac441fa84f1

mbostock commented 14 years ago

Fixed in 2.0.3.