piccolo2d / piccolo2d.java

Structured 2D Graphics Framework
http://piccolo2d.org
Other
51 stars 14 forks source link

setMaxScale and setMinScale not working. #246

Closed mro closed 8 years ago

mro commented 9 years ago

Originally reported on Google Code with ID 246

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.

Reported by chittu.sahoo on 2013-01-03 08:08:34

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

Reported by chittu.sahoo on 2013-01-09 12:19:24

mro 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.

Reported by heuermh on 2013-01-09 16:59:12

mro commented 9 years ago
Yes, I am using Piccolo2d 1.3.1 version with PMousewheelZoomEventHandler external wrapper
available.

Reported by chittu.sahoo on 2013-01-10 03:16:19

mro 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.

Reported by heuermh on 2014-02-17 01:45:27

heuermh commented 8 years ago

Closing as WontFix