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.

Tangent12

Schüler

  • »Tangent12« ist der Autor dieses Themas

Beiträge: 89

Wohnort: Liverpool, UK

Beruf: Application Developer

  • Nachricht senden

1

Samstag, 8. Januar 2011, 12:59

onresize scene change problem

Hi all,

It's been a while since I posted but I have a bit of a problem that I hope someone can help with.
I have a tour with multiple scenes and I want to run an action on the onresize event.
However, when the user clicks a hotspot and the scene changes it appears that my onresize action is executed.

Is it that the onresize event runs automatically when a new scene is loaded?

If so has anyone found a way to get round it so that my action only runs when the pano is actually resized?

Thanks for your help.

T12
Liverpool based panoramic photography, virtual tour and
web media organisation specialising in high quality web experiences.

2

Sonntag, 9. Januar 2011, 18:35

tangent that is not normal behavior. do you have a link we could see it happen with?

Tangent12

Schüler

  • »Tangent12« ist der Autor dieses Themas

Beiträge: 89

Wohnort: Liverpool, UK

Beruf: Application Developer

  • Nachricht senden

3

Montag, 10. Januar 2011, 19:06

Hi VN2009,

Thanks for your response.
I don't have a link available at the moment but I will have by the end of the week.

I will post it as soon as I have it and hope your offer to assist is still open.

Thanks.

T12
Liverpool based panoramic photography, virtual tour and
web media organisation specialising in high quality web experiences.

4

Montag, 10. Januar 2011, 20:04

Tangent I can confirm this result also. i added this to my onresize event. onresize=" set(plugin[openfs].visible, false);" if that is set when the pano opens it removes the fs button. if i add it after the pano loads set(events.onresize, set(plugin[openfs].visible, false)); and then load a new xml or a new scene the button disappears. it seems that it is detecting a loadpano or loadscene as a resize event. it must be a bug.

jpdeglet69

Fortgeschrittener

Beiträge: 191

Wohnort: France

Beruf: VR Maker and Document Management Expert

  • Nachricht senden

5

Mittwoch, 12. Januar 2011, 13:45

Tangent I can confirm this result also. i added this to my onresize event. onresize=" set(plugin[openfs].visible, false);" if that is set when the pano opens it removes the fs button. if i add it after the pano loads set(events.onresize, set(plugin[openfs].visible, false)); and then load a new xml or a new scene the button disappears. it seems that it is detecting a loadpano or loadscene as a resize event. it must be a bug.


Like VN2009, just I've tested the same and I confirm : onresize event after each load*.
Best regards,
JPhD
VR-Guide®/Eleana CEO
https://vr-guide.online

6

Mittwoch, 12. Januar 2011, 16:18

Hi,

that is not a bug, it was my intention to call the onresize event after loading a new pano,
basically to allow updating dynamic positions and the area settings,

best regards,
Klaus

Tangent12

Schüler

  • »Tangent12« ist der Autor dieses Themas

Beiträge: 89

Wohnort: Liverpool, UK

Beruf: Application Developer

  • Nachricht senden

7

Mittwoch, 12. Januar 2011, 16:28

Hi Klaus,

Thanks for the clarification.
If the onresize is called when a new pano loads is there any way I can call an action when the pano is resized that does not use the onresize event?

Thanks for your help.

T12

PS. Thanks to VN2009 and jpdeglet69 for their confirmations.
Liverpool based panoramic photography, virtual tour and
web media organisation specialising in high quality web experiences.

8

Mittwoch, 12. Januar 2011, 16:44

Hi,

you could check if that stage sizes has changed and then call your action/code:

Quellcode

1
2
3
4
5
6
set(sizehaschanged,false);
if(laststagewidth  != stagewidth,  set(sizehaschanged,true));
if(laststageheight != stageheight, set(sizehaschanged,true));
copy(laststagewidth,stagewidth);
copy(laststageheight,stageheight);
if(sizehaschanged, your_resize_action() );


best regards,
Klaus

Tangent12

Schüler

  • »Tangent12« ist der Autor dieses Themas

Beiträge: 89

Wohnort: Liverpool, UK

Beruf: Application Developer

  • Nachricht senden

9

Mittwoch, 12. Januar 2011, 17:09

Hi Klaus,

Thanks very much for suggested code, I will give this a try and let you know.

Thanks.

T12
Liverpool based panoramic photography, virtual tour and
web media organisation specialising in high quality web experiences.