Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

1

Montag, 5. März 2018, 19:19

changing multiple hotpot by modifying their related <style> element

Is it possible to change multiple hotspot appearance by modifying the <style> element to which they refer ?

I tried but it seems like it doesn’t work:

Quellcode

1
onclick="toggle(style[styleSkiLifts.visible)"


Would be convenient though..

Beiträge: 1 117

Wohnort: Poland, Europe

Beruf: krpano developer : virtual tours : the cms4vr owner

  • Nachricht senden

2

Dienstag, 6. März 2018, 09:56

Hi
Is it possible to change multiple hotspot appearance by modifying the
Use SET or COPY or CALC for this.

If you want to change the all hotspots then you will need a FOR action.

Quellcode

1
2
3
  for(set(i,0),i LT hotspot.count,inc(i),
   set(hotspot[get(i)].variable, newvalue);
  );


Kind regards
Piotr
Your own professional, online cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube :: wiki.cms4vr.com

cms4vr team *thumbsup*

3

Dienstag, 6. März 2018, 10:33

Thanks for your answer Piotr *thumbup*

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.

4

Dienstag, 6. März 2018, 10:55

@ 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 :)

Tuur

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Nachricht senden

5

Dienstag, 6. März 2018, 13:19

Hi, you could give the hotspots you want to change an extra id or so..
Then use the 'for' loop and 'load style'.

Quellcode

1
2
3
4
5
6
7
8
9
<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 smart ;-)

Tuur *thumbsup*

6

Dienstag, 6. März 2018, 13:35

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 *thumbup* I'll use this method in a case where I have a really big amount of hotspots.

Cheers *thumbsup*

Tuur

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Nachricht senden

7

Dienstag, 6. März 2018, 13:47

It works also well for small amounts *g*

Oli from Saas-Fee?

Tuur *thumbsup*