Issue 154 in piccolo2d: Zoom handler doesn't interact well with PSwing nodes

0 views
Skip to first unread message

picc...@googlecode.com

unread,
Dec 18, 2009, 12:38:52 PM12/18/09
to piccol...@googlegroups.com
Status: New
Owner: ----

New issue 154 by heue...@gmail.com: Zoom handler doesn't interact well with
PSwing nodes
http://code.google.com/p/piccolo2d/issues/detail?id=154

See comments on Issue 15:

http://code.google.com/p/piccolo2d/issues/detail?id=15#c5
http://code.google.com/p/piccolo2d/issues/detail?id=15#c6


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

picc...@googlecode.com

unread,
Dec 21, 2010, 9:06:45 PM12/21/10
to piccol...@googlegroups.com
Updates:
Status: Accepted
Labels: Type-Defect Priority-Medium Effort-Medium OpSys-All
Component-Extras Milestone-1.3.1

Comment #2 on issue 154 by heue...@gmail.com: Zoom handler doesn't interact

Let's try to get this into 1.3.1.

picc...@googlecode.com

unread,
Mar 5, 2011, 3:28:17 PM3/5/11
to piccol...@googlegroups.com

Comment #3 on issue 154 by atdi...@gmail.com: Zoom handler doesn't interact

This logic was introduced by Issue 15:

PPickPath::processEvent()

343 | if (event.isHandled()) {
344 | return;
345 | }

But I'm not sure why this "short-circuiting" is required. When I remove it,
I don't seem to be able to reproduce the behavior described in Issue 15
(http://goo.gl/G7g1d); that is, I don't see events sent to overlapped nodes.

(1) Am I missing something?

But this short-circuiting does stop event handling up the pick path (so
that ancestor node listeners won't get signalled). Is this really the
desired behavior? When we short-circuit, the canvas-level handlers (pan,
zoom) now won't get the event.

Without the above logic, event handlers can still do their own checking of
event.isHandled() and decide not to handle the events. In addition, there's
PEventFilter.setAcceptsAlreadyHandledEvents() that handlers can use.

(2) Does it make sense to remove this short-circuiting behavior in Piccolo
2.0?

We can't remove it in 1.4 point release for compatiblity but we could, in
1.4, make it a configurable capability to disable short-cutting, I suppose
at the camera or canvas level, something like:

> camera.setPropagatesAlreadyHandledEvents()

This would be false by default (backwards-compatible behavior) but could be
set to true by clients wanting to avoid the bad zoom handling behavior.
They'd have to do something like this to get the good zoom behavior:

camera.setPropagatesAlreadyHandledEvents(true);
// even w/o the short-circuting, by default the zoom handlers won't respond
to already handled events,
// so we'd have to do something like this
PInputEventFilter ef = new PInputEventFilter(mask);
ef.setAcceptsAlreadyHandledEvents(true);
canvas.getZoomEventHandler().setEventFilter(ef);

(3) Thoughts?

picc...@googlecode.com

unread,
Mar 5, 2011, 3:32:17 PM3/5/11
to piccol...@googlegroups.com

Comment #4 on issue 154 by atdi...@gmail.com: Zoom handler doesn't interact

This logic was introduced by Issue 15:

PPickPath::processEvent()

343 | if (event.isHandled()) {
344 | return;
345 | }

But I'm not sure why this "short-circuiting" is required. When I remove it,

I don't seem to be able to reproduce the behavior described in Issue 15;

picc...@googlecode.com

unread,
Mar 20, 2011, 5:15:19 PM3/20/11
to piccol...@googlegroups.com

Comment #5 on issue 154 by atdi...@gmail.com: Zoom handler doesn't interact

In the interest of a 1.3.1 release, I propose we move this to 1.4 milestone
so we can give time for discussion of previous comment.

I'll wait for votes (or absence of votes), and then move to a 1.4.

picc...@googlecode.com

unread,
Mar 20, 2011, 5:19:23 PM3/20/11
to piccol...@googlegroups.com

Comment #6 on issue 154 by atdi...@gmail.com: Zoom handler doesn't interact

cma...@pixelzoom.com

unread,
Mar 21, 2011, 8:18:57 PM3/21/11
to Piccolo2D Developers
+1 for moving to 1.4.

On Mar 20, 3:19 pm, piccol...@googlecode.com wrote:
> Comment #6 on issue 154 by atdi...@gmail.com: Zoom handler doesn't interact  
> well with PSwing nodeshttp://code.google.com/p/piccolo2d/issues/detail?id=154

picc...@googlecode.com

unread,
Mar 26, 2011, 10:22:52 PM3/26/11
to piccol...@googlegroups.com
Updates:
Labels: -Milestone-1.3.1 Milestone-1.4

Comment #7 on issue 154 by atdi...@gmail.com: Zoom handler doesn't interact

Moving to 1.4 as further discussion is needed.

Reply all
Reply to author
Forward
0 new messages