You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

panomaster

Intermediate

  • "panomaster" started this thread

Posts: 279

Location: Kobyłka, Poland

Occupation: Virtual Tours - Spherical Panoramas - Krpano developer

  • Send private message

1

Monday, March 25th 2013, 8:01pm

Triggers

is it possible to trigger event of other layer in any other action?

I'd like to trigger onclick event of plugin A while plugin B is hovered. I mean something like

<plugin ... onover="plugin[a].onclick()" /> or <plugin ... onover="set(plugin[a].onclick, true)" />

2

Monday, March 25th 2013, 8:41pm

Hi,

this code here will execute the code that was stored in the onclick of plugin[a]:

Source code

1
<plugin ... onover="plugin[a].onclick()" />
but the 'context' will be the still the one from the calling plugin.

That means when directly accessing attributes in that onclick event, then the attributes from the calling plugin will be addressed and not the ones from the element where the onclick code is from.

A way to get that working would be using full attribute names in onclick event.

e.g. instead of:

Source code

1
<plugin name="a" ... onclick="set(visible,true);"

use such code:

Source code

1
<plugin name="a" ... onclick="set(plugin[a].visible,true);"


Best regards,
Klaus

panomaster

Intermediate

  • "panomaster" started this thread

Posts: 279

Location: Kobyłka, Poland

Occupation: Virtual Tours - Spherical Panoramas - Krpano developer

  • Send private message

3

Monday, March 25th 2013, 8:50pm

Thanks a lot.