hyperandroid / CAAT

Canvas Advanced Animation Toolkit
hyperandroid.github.com/CAAT
MIT License
727 stars 117 forks source link

mouseUp not working after dropping Actor #48

Closed douglasquade closed 12 years ago

douglasquade commented 12 years ago

I am trying to use the "mouseUp" method to check when an Actor is not being dragged but it does not work.

Is there any way to detect "drop"?

Both Actor and ActorContainer containing this Actor are inside an input list.

robboerman commented 12 years ago

That should work, how are you defining the mouseUp handler? Does the actor register the mouseDown event?

douglasquade commented 12 years ago

This simple code is not working:

myActor.mouseUp = function(event) { console.log("mouseUP"); }

robboerman commented 12 years ago

Does it register the mouseDown event?

myActor.mouseDown = function(event) { console.log("mouseDOWN"); }

douglasquade commented 12 years ago

Yes, it does.

hyperandroid commented 12 years ago

Input lists are hierarchycally applied. If A contains B and B contains C, to have a correct mouse input detection scheme with the input list system, actors must be added in reverse order: C to list 0, B to list 1 A to list 2

otherwise either A or B will get the input at first instance and won't make it propagate and trigger on C.

This is not an issue, but a CAAT functional misuse. General CAAT discussions must be started here:

http://groups.google.com/grphp?hl=es

-ibon