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

  • 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

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


    and the other one in the compass.xml


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

    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:

    Code
    <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... *wink* 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:

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

    Salut.

  • 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

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!