Hi,
Can a hotspot have more than one style attributes ?
I've tried, but I'm not sure how it works ... for overriding attributes for instance.
Thanks !
Hi,
Can a hotspot have more than one style attributes ?
I've tried, but I'm not sure how it works ... for overriding attributes for instance.
Thanks !
Hi nelk,
I have played a little around your request, and it seems that, hotspots can have more than one style attributes....
Here a test code:
<krpano version="1.0.8">
<preview type="grid(cube,16,16,512,0xCCCCCC,0xFFFFFF,0x999999);" details="16" />
<style name="h_style_1" visible="false" enabled="true" handcursor="true" capture="true" children="true"/>
<style name="h_style_2" visible="true"
fillcolor ="0xffaaaa" fillalpha ="0.50" borderwidth ="0.0" bordercolor ="0xffaaaa" borderalpha ="0.00"
fillcolorhover="0xffaaaa" fillalphahover="0.80" borderwidthhover="4.0" bordercolorhover="0xffaaaa" borderalphahover="1.00"
fadeintime="0.150" fadeouttime="0.300" fadeincurve="1.100" fadeoutcurve="0.700"/>
<style name="h_style_3"
fillcolor ="0xaaffaa" bordercolor ="0xaaffaa"
fillcolorhover="0xaaffaa" bordercolorhover="0xaaffaa"/>
<hotspot name="hs1"
style="h_style_1"
style="h_style_2"
onclick="loadstyle(h_style_3); updateobject()"
>
<point ath="-20" atv="-20" />
<point ath=" 20" atv="-20" />
<point ath=" 20" atv=" 20" />
<point ath="-20" atv=" 20" />
</hotspot>
</krpano>
Alles anzeigen
As you can see, the hotspot has 2 style... it seems that the 2 are parsed correctly... note that inside the h_style_1 style the visible is set to false and inside the h_style_2 it is set to true... and it seems to be updated correctly too....
Also, onclick we call a new action loadstyle() that calls a 3 style h_style_3.... it overrides the attributes sets from style h_style_2...
I have tried also inside plugin, but it seems not to be as easy... So, I have to make more test....
Hope this help...
SAlut.
Can someone confirm, that 2 styles for one hotspot is still working? I always get a parsing failure.
I have some hotspots with different url-attributes which are assigned by style.
And I have attributes, which are all the same for all hotspots. And I don't wan't to write these attributes again and again for obvious reasons. E.g. if I want to change scaling for all or want to make a device differentiation for all hotspots at once...
Hi,
the same attribute can't be defined two times in xml!
See here point 6 in the xml check list:
https://krpano.com/docu/xml/syntaxrules/#errorchecking
But using several styles is possible, set: style="style1|style2"
See also the documentation about this:
https://krpano.com/docu/xml/#hotspot.style
But when the same attribute will be defined in both styles, only the value from the latest style will be set.
Best regards,
Klaus
Thank you Klaus, that was exactly, what I was searching for
ZitatBut using several styles is possible, set: style="style1|style2"
And it works :)
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!