Sie sind nicht angemeldet.

Tuur

Erleuchteter

  • »Tuur« ist der Autor dieses Themas

Beiträge: 2 899

Wohnort: Netherlands

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

  • Nachricht senden

1

Sonntag, 8. Oktober 2017, 15:35

onresize bug ?

Hi Klaus,

I think i found an events- onnewscene or onresize bug.
http://www.virtualtuur.com/krpano/onresize_bug/1/
http://www.virtualtuur.com/krpano/onresize_bug/1/tour.xml

When i load a new scene, events onresize is called.
*confused*

edit:mmm. it seems that it is ment to be like that
https://krpano.com/docu/xml/#events.onresize
Can be quite confusing.
Maybe we can have an onresizeonly or so that is only happening when you resize?


Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Tuur« (8. Oktober 2017, 15:57)


2

Dienstag, 10. Oktober 2017, 19:59

Hi,

yes, this is intended.
This helps a lot with dynamic layouts.

Zitat

Maybe we can have an onresizeonly or so that is only happening when you resize?

Sure - add this code to extend krpano with a 'onresizeonly' event:

Quellcode

1
2
3
4
5
6
7
8
9
<events name="onresize_changes_only" keep="true"
        onresize="
            if(last_stagewidth != stagewidth OR last_stageheight != stageheight,
               events.dispatch('onresizeonly');
            );
            copy(last_stagewidth, stagewidth);
            copy(last_stageheight, stageheight);
            "
        />


Usage example:

Quellcode

1
<events onresizeonly="trace('size=',stagewidth,'x',stageheight);" />


Best regards,
Klaus

Tuur

Erleuchteter

  • »Tuur« ist der Autor dieses Themas

Beiträge: 2 899

Wohnort: Netherlands

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

  • Nachricht senden

3

Mittwoch, 11. Oktober 2017, 14:23

Ahhh.. smart.. *love*

i still learn every day.

Thank you!!
Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur