Sie sind nicht angemeldet.

1

Samstag, 2. Juli 2016, 20:59

Setting hotspot style with JS not working

Hi,
I am able to add hotspot and I can set url,ath,atv etc. attributes. But I can not set style attribute.

Quellcode

1
pano.call("addhotspot(" + item.id + ");");pano.call("set(hotspot[" + item.id + "].ath,0);");pano.call("set(hotspot[" + item.id + "].atv,0);");pano.call("set(hotspot[" + item.id + "].url,url);");



this code above is working perfect. But I dont want to set these in js.

Quellcode

1
2
3
<style name="mesh1" url="arrow.jpg" ath="0" atv="0" scale="1" ondown="draghotspot();" />

pano.call("addhotspot(" + item.id + ");");pano.call("set(hotspot[" + item.id + "].style,mesh1);");



EDIT :

I found my answer. I have to load style instead of setting style.

Quellcode

1
pano.call("hotspot[" + item.id + "].loadstyle('styleName');");

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »ccaymaz« (3. Juli 2016, 00:10)


2

Samstag, 29. April 2023, 09:11

How to change style hotspot when clicked hotspot from client side? *unsure*
*thumbup* Woody *thumbup* KEEP MOVING FORWARD *thumbup*

Ähnliche Themen