Will check into that, since CAAT input does not work that way when the
mouse exits the canvas object.
Will tell you something asap.
About why input is consumed by not the Actor you expect, I'll explain
a little bit how input works on CAAT.
By default, every CAAT Actor, regardless of its type is elligible to
have input sent to it. If want to disable this behavior globally, set
CAAT.Actor.prototype.mouseEnabled= false, or call enableEvents(false)
on every actor you don't want to have input events sent. Input system
has two working methods:
a) Direct input. This procedure, starts hierarchycally from the
director object, and starts traversing down the scene graph trying to
find a suitable Actor where the mouse cursor/touch event lies in.
Any actor won't have input events sent if, you call
enableEvents(false), is out of frame time, is not visible, or the
cursor/input is not inside actors bounding box.
Containers, first try to have their children consumed the input event,
and if not, it will be consumed by the container. That's the reason
for you Shape not getting input if it contains a child.
b) You may encounter situations where you want the input sent only to
either a group of actors, or have it tested on some Actors previously
to traverse the scene graph. You must take a look at the following
methods to see how it works:
+ enableInputList(number) : number of priority lists to set for
this scene. A priority list is a list of actors to
which are suitable to receive input
first. If no actor on the priority lists are under
the cursor, the whole scene graph is
traversed instead.
+ addActorToInputList( actor, index, position ) : add an actor to a
given priority list at certain position.
+ emptyInputList( index ) : remove all elements from a list.
+ removeActorFromInputList( actor, index ) : remove an actor from a
list, or if no index list is supplied remove
the actor from every list in which appears.
If none of the prioritized actors consume the input events, the
previos procedure will be rolled, and CAAT will start traversing the
scene graph.
you could also refresh your CAAT code, and look at demo 4
coordinates_org.html where you could see how both types, priority
lists and default input behave.
will check how to make input continue to be sent if dragging and the
mouse gets out of the scene.
Regards,
-ibon