Sie sind nicht angemeldet.

1

Freitag, 26. Februar 2016, 01:55

onviewchange keeps firing when not moving

Hey guys I have onviewchange event that keeps firing off and doesn't stop when I'm not moving, any ideas?

thanks

Quellcode

1
2
<events onviewchange="onViewChange()" /> 
<action name="onViewChange">trace("On view change");</action>

2

Freitag, 26. Februar 2016, 19:18

So in my little demo I'm making so I can learn krpano I'm using Adobe Edge and embedding krpano with a iframe and I've combined the video interface and animated hotspots examples into my demo. I've isolated the problem and when I remove url in the <sphere>

Quellcode

1
<image devices="panovideosupport">		<sphere url="plugin:video" />	</image>



the constant firing of onviewchange stops. Very strange. Anyone run into similar problems?

3

Montag, 29. Februar 2016, 10:34

Hi,

the onviewchange fires on every redraw.

To track certain view changes it would be necessary to check for changes of that values,
e.g. this way:

Quellcode

1
2
3
4
5
6
7
8
9
<events onviewchange="test();" />

<action name="test">
  if(view.hlookat != last_view_hlookat OR view.vlookat != last_view_vlookat,
  	copy(last_view_hlookat, view.hlookat);
  	copy(last_view_vlookat, view.vlookat);
  	... do something ...
   );
</action>


Best regards,
Klaus

4

Mittwoch, 2. März 2016, 20:00

Thank you very much