Say you click inside a container and want to know the mouse.x position within the container -- how many pixels from the left edge of the container the click point is. Is there an easy way to do this if the container is a child of another container which itself is the child of another container and so on?
The problem: Mouse.x it the mouse's offset from the left edge of the stage. Say you click inside container1. If the container sits on the stage then container1.x is its offset from the left side of the stage. You can simply subtract container1.x from mouse.x and know how far inside container1 the mouse is. But if container1 sits inside container2 then container1.x is only the offset from the left edge of container2.x. Not very helpful. One way to handle this with HTML elements using javascript is to set up a loop adding each div's (container's) offset to its parent then to its parent until you get to the top level div. I suspect you could do the same in KRPano but I'm betting there is a much easier way.
Is there???