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.

    Code
    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.

    Code
    <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.

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

    Einmal editiert, zuletzt von ccaymaz (3. Juli 2016 um 00:10)

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!