samreid / piccolo2d

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

PSelectionEventHandler grip points do not scale with zoom #72

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The PSelectionEventHandler circuler grip points to resize a selected item
dont scale so a zoomed in item is obscured by the grip points easily.

Original issue reported on code.google.com by norder...@gmail.com on 25 Nov 2008 at 12:27

GoogleCodeExporter commented 9 years ago
I assume this is with Piccolo2D.Java?

Original comment by heue...@gmail.com on 16 Mar 2009 at 6:02

GoogleCodeExporter commented 9 years ago
Yes it is with Piccolo2D.Java. All it needs is PBoundsHandle to setScale to the
current zoom level at some point

Original comment by norder...@gmail.com on 17 Mar 2009 at 9:14

GoogleCodeExporter commented 9 years ago

Original comment by heue...@gmail.com on 15 May 2009 at 6:42

GoogleCodeExporter commented 9 years ago
I agree that the element should resize, but I think there whould be a minimum 
size to
it. Maybe after it reaches that size making the zooming away from the node 
pushes the
handles away from it slightly so that it doesn't overlap the selected node?

Should be easy enough to implement if that's how we want it implemented.

Original comment by allain.lalonde on 21 Jul 2009 at 2:32

GoogleCodeExporter commented 9 years ago
Can this effect bei achieved with a custom PSelectionEventHandler? If this is 
the
case, the current semantics should remain unchanged.

Original comment by mr0...@mro.name on 21 Jul 2009 at 7:24

GoogleCodeExporter commented 9 years ago
(an example implementation can well go into the javadocs of 
PSelectionEventHandler)

Original comment by mr0...@mro.name on 21 Jul 2009 at 7:37

GoogleCodeExporter commented 9 years ago
I think all we have to to is to encourage customisation here

http://code.google.com/p/piccolo2d/source/browse/piccolo2d.java/trunk/extras/src
/main/java/edu/umd/cs/piccolox/event/PSelectionEventHandler.java#178

Original comment by mr0...@mro.name on 22 Jul 2009 at 3:22

GoogleCodeExporter commented 9 years ago
As per my conversation with Marcus two approaches to solving this problem:

1. adding setMinimumScale, and setMaximumScale to the handles
2. introducing a handle factory so that developers can register their own 
custom 
handle implementations

Personally I go with #1 since I think it's the simplest change that could 
possibly 
work.

Marcus sees #2 as the best because he likes the idea of maximum flexibility.

I agree with Marcus' view of it, but I think introducing factories is something 
that 
shouldn't be introduced until 2.0 as I see it as a significant enough change to 
warrant some deep infrastructure changes piccolo wide. Users should be able to 
plug 
in their own PCamera implemtnations, PLayer, etc for use when using PCanvas, 
etc. 
(obvious just my 2 cents)

Original comment by allain.lalonde on 22 Jul 2009 at 3:25

GoogleCodeExporter commented 9 years ago
replace the static factory PBoundsHandle with a normal factory that creates 
PNodes
and inject it into the PSelectionEventHandler.

Those PNodes can use semantic zooming to scale as appropriate in the context of 
the
given GUI.

Original comment by mr0...@mro.name on 22 Jul 2009 at 3:26

GoogleCodeExporter commented 9 years ago
The method PSelectionEventHandler#decorateSelectedNode(PNode) is already 
public, so
why need a different factory?  Users are free to override this method and chose
another implementation, e.g.

    public void decorateSelectedNode(PNode node) {
        MySemanticBoundsHandle.addBoundsHandlesTo(node);
    }

I suggest WontFix.

Original comment by heue...@gmail.com on 28 Jul 2009 at 2:48

GoogleCodeExporter commented 9 years ago
You're absolutely right. So let's just point this out a bit more prominent in 
the
documentation.

Original comment by mr0...@mro.name on 28 Jul 2009 at 9:07

GoogleCodeExporter commented 9 years ago
Since this thread shows how one would go about implementing custom handles, I'm 
marking 
this one as Won't Fix. Exactly what handles are to be displayed and with what 
semantics, is a developer decision and probably doesn't belong in the library.

Original comment by allain.lalonde on 5 Aug 2009 at 4:09

GoogleCodeExporter commented 9 years ago

Original comment by allain.lalonde on 30 Oct 2009 at 4:13