Panning with the SVGPan library seems to works in all the desktop browsers sure, but zooming doesn't work at all in Opera or IE because the library is doing browser sniffing and assuming the wrong things. And it's likely that the rate of zooming is different in the different browsers too, if that matters (see e.g http://stackoverflow.com/questions/5527601/normalizing-mousewheel-speed-across-browsers).
There are no listeners registered for touch events, so I'd be surprised if the panning worked as intended on tablets or mobile phones, and I'd be even more surprised if there was something like scrollwheel emulation on such devices, so probably you won't have the ability to zoom with SVGPan unless you hack the library yourself. To conclude, the SVGPan library works to its full extent only if: 1) the user has a mouse 2) the user is using a webkit- or mozilla-based browser These shortcomings can of course be fixed. If you want something that abstracts away the ways you trigger zooming and panning, D3.js has some behaviour helper methods to help you with that, see https://github.com/mbostock/d3/blob/master/src/behavior/drag.js and https://github.com/mbostock/d3/blob/master/src/behavior/zoom.js. An example of it being used: http://bl.ocks.org/1182434 - works fine on tablets as well as normal desktop systems. Or for a simpler example, https://github.com/mbostock/d3/blob/master/examples/zoom-pan/zoom-pan-transform.html. On Thu, 07 Jun 2012 20:14:50 +0200, jamesd <jcdeeri...@yahoo.com> wrote: > All I can say is that SVGpan is working extremely well for me. It allows > the user to scroll the image on the trackpad without a mouse, I assume > on a tablet you're finger swipe will do the same thing (Is that what you > mean by touch events?). > > --- In svg-developers@yahoogroups.com, "Erik Dahlstrom" <ed@...> wrote: > >> The SVGPan library has some bugs that needs to be patched in to make it >> actually work well, see e.g >> http://code.google.com/p/svgpan/issues/detail?id=6 for how badly it's >> broken. >> >> Also most people probably expect to be able to zoom and pan without >> having >> a mouse (or a scrollwheel mouse even). There's no support for touch >> events >> in this library. >> >> -- >> Erik Dahlstrom, Core Technology Developer, Opera Software >> Co-Chair, W3C SVG Working Group >> Personal blog: http://my.opera.com/macdev_ed >> > > -- Erik Dahlstrom, Core Technology Developer, Opera Software Co-Chair, W3C SVG Working Group Personal blog: http://my.opera.com/macdev_ed ------------------------------------ ----- To unsubscribe send a message to: svg-developers-unsubscr...@yahoogroups.com -or- visit http://groups.yahoo.com/group/svg-developers and click "edit my membership" ----Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/svg-developers/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/svg-developers/join (Yahoo! ID required) <*> To change settings via email: svg-developers-dig...@yahoogroups.com svg-developers-fullfeatu...@yahoogroups.com <*> To unsubscribe from this group, send an email to: svg-developers-unsubscr...@yahoogroups.com <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/