tmpkus / piccolo2d

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

setMaxScale and setMinScale not working. #246

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi Team,
I am first time user, so I tried to achieve with my limited knowledge.
Basically facing 2 issues:
1. restricting Max and Min size of zooming does not work with 
PMouseWheelZoomEventHandler
2. Canvas look is shrinking for repeated Zoom IN/OUT using mouse wheel, (like 
zoom in one step then zoom out one step, repeat...)

What steps will reproduce the problem?
1. Used the MouseWheelZoomExample and added 
mouseWheelZoomEventHandler.setMinScale(1.0d);

        // install mouse wheel zoom event handler
        final PMouseWheelZoomEventHandler mouseWheelZoomEventHandler = new PMouseWheelZoomEventHandler();
        getCanvas().addInputEventListener(mouseWheelZoomEventHandler);
        mouseWheelZoomEventHandler.setMinScale(1.0d);

I tried with various values for both Max and Min, but don't see any restriction 
while zooming.
2.
3.

What is the expected output? What do you see instead?
It should restrict upon reaching max and Min value

What version of the product are you using? On what operating system?
1.3.1 Ubuntu 12.4

Please provide any additional information below.

I was trying to set the max and min zoom scale, so need to override the 
mouseWheelRotated() function, which is not completely achievable, then I 
encounter another issue,Zoom-in and Zoom-Out by one step continuously shrinking 
the look and also there is center coordination shift. so in other word, we 
can't get back to original size once mouse wheel zooming option.

Original issue reported on code.google.com by chittu.sahoo on 3 Jan 2013 at 8:08

GoogleCodeExporter commented 9 years ago
Please share, if you have the solution to fix this.

Original comment by chittu.sahoo on 9 Jan 2013 at 12:19

GoogleCodeExporter commented 9 years ago
To clarify, are you on Piccolo2D version 1.3.1 or on svn trunk (version 
2.0-SNAPSHOT)?  It has been a while since I looked at the 1.3 branch but I 
don't see PMouseWheelZoomEventHandler there.

Original comment by heue...@gmail.com on 9 Jan 2013 at 4:59

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Yes, I am using Piccolo2d 1.3.1 version with PMousewheelZoomEventHandler 
external wrapper available.

Original comment by chittu.sahoo on 10 Jan 2013 at 3:16

GoogleCodeExporter commented 9 years ago
Hello, there aren't setMinScale/setMaxScale methods in 
PMouseWheelZoomEventHandler in Piccolo2D version 3.x on svn trunk; I'm not sure 
how to help further.

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