ericdrowell / KineticJS

KineticJS is an HTML5 Canvas JavaScript framework that extends the 2d context by enabling canvas interactivity for desktop and mobile applications.
http://www.kineticjs.com
3.98k stars 752 forks source link

kineticjs image is not listening event #963

Closed emnkoksal closed 10 years ago

emnkoksal commented 10 years ago

I had an error in my game that I couldn't find the reason. I have about 50 undraggable Images. Several times I am adding / removing / enabling(listening) / disabling / cache / clearCache / filtering etc.

After some times, one of the image not anymore listens to the events, although it seems to. When this occured, I tried to remove and add again event handlers, drawHit again, etc. but nothing worked. That Image never more listens to events.

However, I have found a curious thing: When I clone that image (image that is not listening; I will call it as original image) and add the cloned image to the layer, then the cloned image is listening to events for the original image! For example, when mouse is over the cloned image, stroke is enabled for the original image!

What could be the reason for the image not listening to events?