GoogleCodeArchive / piccolo2d

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

events not delivered to PSwing Components for some transforms #159

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

Run the attached example (DebugPSwingExtremeScaling) with Piccolo2D 1.3 rc1.

What is the expected output? What do you see instead?

The radio buttons in the example should be functional, and a message should
be printed to System.out when a button is selected.  Instead, the buttons
are unresponsibe.

Additional information:

This example works fine with our SVN snapshot (r390), but not with
Piccolo2D 1.3 rc1.  I suspect that something changed related to the
precision of transforms or picking, but I don't know these areas of Piccolo
well enough to isolate further.

Finally... I realize that such extreme transforms are probably atypical.
But this is not a hypothetical example, something similar to this was done
in an actual PhET application, so this is a breaking change.

Original issue reported on code.google.com by cmal...@pixelzoom.com on 1 Feb 2010 at 5:55

Attachments:

GoogleCodeExporter commented 9 years ago
Fantastic. Thank you for the example

Original comment by allain.lalonde on 1 Feb 2010 at 5:58

GoogleCodeExporter commented 9 years ago
I've narrowed it down to the code in PNode.globalToLocal. It seems to be lossy. 
I'll 
try changing it to compute a globalTransform then inverting once.

Original comment by allain.lalonde on 1 Feb 2010 at 7:06

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r963.

Original comment by allain.lalonde on 1 Feb 2010 at 7:30

GoogleCodeExporter commented 9 years ago
This issue appears to be fixed.

Caveat: r963 diff shows that most of PNode source file was modified.  In a 
separate
email, Allain noted that the fix was in globalToLocal(final Point2D 
globalPoint) and
computeGlobalTransform(final PNode node).  So I patched PNode 1.3-rc1 with just 
those
methods, and it tests OK.  I did NOT test the entire new version of PNode, 
trying to
keep my test environment as true to rc1 as possible so that I don't pull in new 
problems.

Original comment by cmal...@pixelzoom.com on 1 Feb 2010 at 7:48

GoogleCodeExporter commented 9 years ago

Original comment by cmal...@pixelzoom.com on 1 Feb 2010 at 7:50

GoogleCodeExporter commented 9 years ago
Note r963 should be reapplied to trunk without tab characters before this issue 
is closed

Original comment by heue...@gmail.com on 1 Feb 2010 at 7:56

GoogleCodeExporter commented 9 years ago
Looks good for me with r964

Original comment by heue...@gmail.com on 1 Feb 2010 at 8:06