What I'm trying to accomplish?
I'm working on a plugin that needs to know if a mouse click is occurring over a particular layer in KRPANO.
Why?
The plugin collects certain information about what the user is doing and if the user is interacting with the pano itself, I am storing cursor position in "screentosphere" coordinates but if a user is interacting with a menu, I need to use "screentolayer" coordinates instead. I'm not sure what is the best way for the javascript plugin to be "aware" of the cursor location in KRPANO other than what I was attempting below.
I've tried querying mouse clicks with event.target.id and event.target.tagName and I can see the ids and element types of any elements I am adding to the DOM through the plugin but any click outside of specific plugin element just returns an empty id and a DIV for the tageName.