Sie sind nicht angemeldet.

1

Freitag, 9. September 2016, 00:28

Can I send a click to a layer?

I have a number of 'mapspots' on a map which each loads its associated scene when clicked, as well as performing some other operations specific to that scene. Each mapspot is contained within its own layer. I also need exactly the same operations to be triggered by another part of my xml. To avoid duplicating code is there a way I can simply send a click to the onclick event of the appropriate mapspot layer?

I am a photographer, not a coder, so please forgive me if the answer to this is staring me in the face!

Regards to all

Andrew

2

Freitag, 9. September 2016, 21:56

Hi,

the callwith action can be used for that:
http://krpano.com/docu/actions/#callwith

E.g.

Quellcode

1
callwith(layer[nameofthelayer], onclick);


Best regards,
Klaus

3

Montag, 12. September 2016, 13:54

Excellent! Thank-you Klaus, just what I needed.