Sie sind nicht angemeldet.

noupunt

Schüler

  • »noupunt« ist der Autor dieses Themas

Beiträge: 47

Wohnort: Barcelona

Beruf: Photographer and full stack developer

  • Nachricht senden

1

Montag, 20. Dezember 2021, 22:06

native or very fast way to identify layer or hotspot when clicking.

Hello!

Is there any native or very fast way to identify if the element is a layer or a hotspot dinamicly?

For instance:

<action name="for_all_things_clickable">
if(ISLAYER,
set(bgcolor,'0xffffff);
,
set(bgcolor,'0x000000');
);
</action>

Thanks!

2

Montag, 20. Dezember 2021, 22:31

Quellcode

1
2
3
<action name="for_all_things_clickable">
calc(bgcolor, _type == 'plugin' ? 0xffffff : 0x0);
</action>

3

Dienstag, 21. Dezember 2021, 08:37

Hi,

first: variables that start with an unterline '_' should not be used, they are internal and can anytime change betweens versions!

For checking if an element is a layer or a hotspot there exists already a variable in the current version: 'ishotspot'. It's currently not in the documentation, but with the next release it will be.

Best regards,
Klaus

noupunt

Schüler

  • »noupunt« ist der Autor dieses Themas

Beiträge: 47

Wohnort: Barcelona

Beruf: Photographer and full stack developer

  • Nachricht senden

5

Dienstag, 21. Dezember 2021, 15:53

Nice!! Thanks!!!