moiri / kobold

jump and run on web page
2 stars 0 forks source link

Click Movable #39

Closed moiri closed 10 years ago

moiri commented 10 years ago

click events are not possible on movable

moiri commented 10 years ago

They are possible. The problem is more likely that the event is registered before the movable exists.

moiri commented 10 years ago

Problem: As soon as the movable is appended to another object, the registred events are lost. Solution: by using detach, this problem should be circumvented -> no joy yet...

moiri commented 10 years ago

Finally found the problem: Ignore the comments above. The css attribute "pointer-events:none;" on solidColliders is the reason that the movable is not clickable. It is there to solve some z-index issue (https://github.com/moiri/kobold/commit/02f522a86f7c32b78fc265860db56f491cf0f362#diff-23b024677d4732ee53b6d7bdc52e0fe2). Questions: Why is this attribute needed exactely? Why is the movable attached to the solid rather than the object?

moiri commented 10 years ago

fixed: https://github.com/moiri/kobold/commit/49b002866044500349d9046218643f445bc3c9a3