I'm working on a close source project so the amount of example code I can supply is relatively limited, so let me see if just simply describing my problem will help.
We have three containers, linePoints and lineSegments, these containers are children of the line container.
They are all interactive and in buttonMode
We have two types of sprites, the points, and segments, these are children within their respective containers. These sprites are created also interactive and in buttonmode with events tied to them. Points get all of the drag related events (mosedown, mouseup etc) and Segments get just the click event.
The structure :
-points(sprite, interactive, draggable)
-segments(sprite, interactive, clickable)
The problem :
My points are drawn on top of the line segments, yet when I click on them to drag them around, this fires the click event on the lines lying beneath them (which actually creates a new point, so things get a bit messy)
So my question is, are click events supposed to fall through sprites and activate on sprites underneath them in the draw order?
If so then is there a way to properly block this from happening ?
What I've tried :
binding null to the click event on the points: point.on("click", null)
debinding the click event on the points : point.off("click") - thought I couldnt actually find documentation on .off() so I'm not sure this even does anything
changing the size of my points to be absolutely sure they are covering the lines - the clicks are definitely "falling through" and not just sneaking around, I'm clearly getting two interaction events at the same time here, one on the point when I mousedown to drag, and one on the line underneath it.
So there's my issue, if this really isn't enough to explain or illustrate the problem, I can make a fiddle on request, but I'd like to avoid doing the extra work if it's not required. It's efficiency not laziness!
Thanks all in advance