changing multiple hotpot by modifying their related <style> element
-
-
-
Thanks for your answer Piotr
This is what I thought. But then, so modify the appearance of just a subset of hotspot, there is no other way than selecting them one by one by their name I guess (?)
Would be interesting to be able to modify them by their related style, would be pretty flexible, a bit like html + css.
-
@ oli :
if you apply a style, all properties not existing on the target get set by the ones defined in the style.
this is done only once when all xml is loaded an parsed.
after that the target is independent of the style.the thought is nice ofc, but a change would break all existing code :)
-
Hi, you could give the hotspots you want to change an extra id or so..
Then use the 'for' loop and 'load style'.Code<hotspot name="bla" id="flex" etc etc /> for(set(i,0),i LT hotspot.count,inc(i), if(hotspot[get(i)].id == 'flex', hotspot[get(i)].loadstyle(style2); ); );
of course it is possible to mix styles like style="style1|style2"
so maybe with a combination of the 'for' loop and the styles you could be smartTuur
-
Thanks indexofrefraction, I didn't know that. That explains.
Thanks Tuur, I guess it's the best way to do what I try to achieve I'll use this method in a case where I have a really big amount of hotspots.
Cheers
-
It works also well for small amounts
Oli from Saas-Fee?
Tuur
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!