Comment #2 on issue 236 by Add zoom event handler that responds to mouse wheel events

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.scaleViewAboutPoint(scale, anchor.getX(), anchor.getY());

Piccolo2D Developers Group:

Reply via email to