bearstampede / piccolo2d

Automatically exported from code.google.com/p/piccolo2d
0 stars 0 forks source link

MouseWheelZoomEventHandler doesnt stop zooming #257

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem? What is the expected output? What do you 
see instead?
Using a mouseWheelRotated/ mouseWheelZoomEventHandler causes the 
panel/scrollpane/swing/canvas to be zoomed very deep. The reason being is that 
it doesnt stop zooming after stopping to rotate the mouse wheel. Instead it 
keeps zooming until the x value is NaN.

What version of the product are you using? On what operating system?
Piccolo2D 3.0 on Xubuntu

I used following code to add a mouse wheel zoom event handler:

canvas.removeInputEventListener(canvas.getZoomEventHandler());

final PMouseWheelZoomEventHandler mouseWheelZoomEventHandler = new 
PMouseWheelZoomEventHandler();
canvas.addInputEventListener(mouseWheelZoomEventHandler);

Original issue reported on code.google.com by osto_d...@hotmail.com on 16 Feb 2014 at 10:12

GoogleCodeExporter commented 8 years ago
Thank you for reporting this issue.  Might you be able to check if the 
MouseWheelZoomExample works for you?

http://code.google.com/p/piccolo2d/source/browse/piccolo2d.java/trunk/examples/s
rc/main/java/org/piccolo2d/examples/MouseWheelZoomExample.java

Original comment by heue...@gmail.com on 17 Feb 2014 at 1:40