1.20 regression - nested styles

  • Was working in 1.19 but not anymore in 1.20 :

    I simplified the case, but 1.20 shows a critical regression on nested styles on my side. Maybe I'm mistaken but :

    Code
    <style name="style1" /> 
    <style name="style2" style="style1" /> 
    <style name="style3" style="style2" url="myimage.jpg" ath="20" atv="20" />
    <hotspot name="myhotspot" style="style3" />

    works : the hotspot is shown at ath:20 and atv:20

    Code
    <style name="style1" />
     <style name="style2" style="style1" ath="20" atv="20" /> 
     <style name="style3" style="style2" url="myimage.jpg" />
    <hotspot name="myhotspot" style="style3" />




    this does not work, the hotspot is shown ath:0 and atv:0.


    1.20 does not support nested styles anymore.


    And hotspot finally says its style is "style1" (trace(get(hotspot[myhotspot].style) => "style1").


    Best

  • Thanks for the pipes, I'll try to stick with your 2nd example.

    <style name="style3" style="style1|style2" />
    <hotspot name="myhotspot" style="style3" />


    I imagine my example was never meant to be working in 1.19 either and it was just luck.

    But it seemed so straightforward and so easy in krpano's documentation : "When the xml element will be first created, all attributes defined at the <style> element will be copied to the element itself." I guess this sentence is wrong when the xml element is a style.


    Thanks!

    Florian

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!