Question

Yet again, I'm here to ask for assistance, since either I'm stupid or this stuff is not working as noted. I have 2 objects in a group, a Shape and a Textpath, with Textpath being on top of the Shape. I've set up a 'mouseover' and 'mouseout' and if I go from the Shape to the Textpath, it triggers the 'mouseout' event, even though both are part of the same group. I've found a bug report describing this - https://github.com/ericdrowell/KineticJS/issues/603 - is this still not fixed?

Était-ce utile?

La solution

I have had the same problem, and am still not sure if it is indeed a bug, or expected behaviour. Anyway, how I solved it was by adding the mouseover and mouseout to just one of the children that 'defines the perimeter' of that group.

So in case of the picture below, which can be seen as a group with two rectangles, a large red one, and a smaller rotated green one. Only add the listener to the red rectangle. Alternatively you could add the listener to the group and set the listening property of the green rectangle to false.

enter image description here

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top