Comment #2 on issue 236 by [email protected]: Add zoom event handler that
responds to mouse wheel events
http://code.google.com/p/piccolo2d/issues/detail?id=236
Looks good.
PZoomEventHandler uses a viewZoomPoint (where the user clicked) to anchor
the zoom. Consider anchoring zoom where the mouse is pointing when the
wheel is rotated. (This is how Google Maps works, for example.)
Something like:
...
final Point2D anchor = e.getCanvasPosition();
camera.localToView(anchor);
camera.scaleViewAboutPoint(scale, anchor.getX(), anchor.getY());
...
--
Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en