Sie sind nicht angemeldet.

tommo77funk

Fortgeschrittener

  • »tommo77funk« ist der Autor dieses Themas

Beiträge: 159

Wohnort: London

Beruf: Photographer

  • Nachricht senden

1

Freitag, 9. Oktober 2009, 18:07

Setting panorama north and textfield plugin height

Hi,

When using the compass from this example

How do I set the heading in each panorama, for north ?

I sort of do this already with the radar and googlemaps plugin, but there does not
seem to be a way to set north in panorama, if north is not at hlookat="0"

I have tried

<action name="onstart">
<!-- SET HEADING -->
set(heading, 60);
</action>

but it does not work and the only thing I can find that controls the orientation of the compass is using
hlookat which sets the horizontal view, but the compass seems to assume that each
panorama is north at hlookat="0", which in some cases it is not (i dont think). How do i adjust it if the panorama
is north at hlookat="60" ?

Also I am a bit confused on setting the height of the textfield plugin,
I have wordwrap="true" autosize="center" width="66%" height="prop" so would like the box to appear
at 66% of the screen and the height to be adjusted accordingly to fit the text. If i use pixel values for height
I have problems when viewed on monitors of different widths, more text appears on along the rows meaning less height is needed,
so i get too much black space, how can I accomodate the various heights on different sized monitors.

Perhaps I should be using % for text size as well ?

Anyway in the following example you will see my problems.

virtual tour



Many thanks for any help or advice,

tom

2

Montag, 12. Oktober 2009, 04:38

Hi tommo77funk,

Zitat

......... but the compass seems to assume that each panorama is north at hlookat="0",................
In your code, you set the heading 2 times.... one in the uganda3.xml

Quellcode

1
<krpano version="1.0.8" onstart="set(heading, 200);">

and the other one in the compass.xml

Quellcode

1
2
3
4
5
6
7
8
9
10
11
<events onxmlcomplete="action(onstart);"
        onviewchange= "action(onviewchange);"
/>

<!-- show info, set heading, create hotpots -->
<action name="onstart">

<!-- SET HEADING -->
set(heading, 0);

</action>

The second one erase the first one... this is why you always have the same heading...( set(heading, 0);) ;-)

About the textfield plugin, I am confused too...
It seems the autosize="center" have priority over height="prop or anything else"... But the autosize seems to have strange behaviours... i do not have a good answer for this. *wacko*

Another thing... I suggest you to modify your hide_text() action in this way:

Quellcode

1
2
3
4
5
6
7
8
9
	<action name="hide_text">

 	tween(plugin[info_text].alpha,0,0.5);
	 tween(plugin[info_text].textblur,0,0.5);
	 tween(plugin[info_text].blur,0,0.5,,wait);
	 set(plugin[info_text].visible,false);
	 set(plugin[info_text].enabled,false);
		
	 </action>

The enabled=false was missing in your code... ;-) and with the wait flag in line 5, the delayed call is not needed...

Also, perhaps you can add a step to your compass switching size to allow the same resizing as when first loaded... Like this:

Quellcode

1
onclick="switch(destscale,0.5,0.7,1.0);tween(scale,$destscale);"


Salut.

tommo77funk

Fortgeschrittener

  • »tommo77funk« ist der Autor dieses Themas

Beiträge: 159

Wohnort: London

Beruf: Photographer

  • Nachricht senden

3

Dienstag, 13. Oktober 2009, 14:21

Hi Michel,

WOW ! Thanks very much for your reply, I have fixed the compass, and really like the click to toggle function you gave. Great advice, nice one !

About the text height, I am experimenting now (was away all yesterday). And I will report back If i find a fix. Seems that my whole GUI could do with correct scaling to screen size, but the text issue is definately a strange one, as my tests bring some strange results.

hmm... *huh*

Salut !

tom