Hi there
I have an html page with 2 panos on it - each in a different div and with a different id (lets say pano1 and pano2)
I've got the following in my XML:
This works fine
When a pano is clicked the event is raised and I do something.
In my case I get the x/y of the location clicked at using something like:-
function krpano_mouseclick() {
var krpano2 = document.getElementById("Pano2");
if (krpano2 && krpano2.get)
{
krpano2.call("screentosphere(mouse.x, mouse.y, mouseath, mouseatv)");
var mouse_at_xr = krpano2.get("mouse.x");
var mouse_at_yr = krpano2.get("mouse.y");
etc etc
Obviously this works fine for either Pano1 OR Pano2 - whichever I hard code in the getElementByID method - but because I am loading the panos dynamically I need to be able to detect which pano has been clicked in this javascript (I can't have 2 different events for example).
So....
...is there a way in the xml event to pass back the id of the Pano ? Or is there some other/better way of doing this on the JS side ?
Hopefully that is clear and makes some kind of sense
Many thanks in advance
Steve