Implementing Tooltips in 1.16

  • I'm looking at the HTML5 tooltips example pano. https://krpano.com/examples/116/e…s/tooltips.html

    However, I have not found any tutorial or code example provided in the dox. The closest I can come is to manually edit the URL address above to obtain its XML file. https://krpano.com/examples/116/e…ps/tooltips.xml

    I looked it over, understand what is happening, but when I copy the relevant code (removing fade-in/out calls) to my own XML's generated with Kolor's PTP, I do NOT get any mouseover tooltips on a PC the same as with the demo (flash disabled, thus forced HTML5). Not expecting anything on mobile devices, so that's not an issue, but on desktops it is.

    This is the code added/edited to one of my tour pano XMLs...

    Since this is NOT working, even after clearing the browser's cache, there must be some OTHER code in another file to enable this. What and where is it?

    That or please provide specific steps to implement this new option manually to existing XMLs.

  • Set the alpha value and the textfield position in the onover event of the tooltip style.

    Try adding these two lines to the tooltip style:

    set(layer[tooltip].alpha, 1.0);
    asyncloop(hovering, copy(layer[tooltip].x,mouse.stagex); copy(layer[tooltip].y,mouse.stagey); );

    The asyncloop continuously updates the textfield position.

  • asyncloop(hovering, copy(layer[tooltip].x,mouse.stagex); copy(layer[tooltip].y,mouse.stagey); );

    The asyncloop continuously updates the textfield position.

    Thanks! Updating the layer x y with mouse x y and setting the alpha was the solution (the layer's alpha=0 and visible=false looked suspicious, but it didn't click to fiddle with them). Since I don't want the tool tip to follow the mouse, I removed the asyncloop function call.

    Now, I'd be truly happy if there was a way to auto-fit the width of the background to only the changing width of the HTML content.

  • Set the alpha value and the textfield position in the onover event of the tooltip style.

    Try adding these two lines to the tooltip style:

    set(layer[tooltip].alpha, 1.0);
    asyncloop(hovering, copy(layer[tooltip].x,mouse.stagex); copy(layer[tooltip].y,mouse.stagey); );

    The asyncloop continuously updates the textfield position.


    Hi there !

    I'm new here and I've done a search on the forum. Here seems to be the most appropriate place for this question :

    I have 2 polygon hotspots into panotour pro v2.
    I would like them to be visible together when mouse is "onover" "onhover" on of them. I would like that both tooltips be visible as well together. So the first tooltip would appear next to the cursor, and the second tooltip would be displayed at one fixed place.
    Do you think this is possible ?
    Thank you for your help !
    Cyril

  • I have tried this code to make the polygon appear:
    It works exept for tooltip... do you understand why ?

    <hotspot name="spotpolygon1"
    visible="true"
    style="Polygonpolygonevertimage80%"
    descriptionid=""
    onclick="onclickspotpolygon1"
    tooltip="spotpolygon1_tooltip"
    onover="displaypolygon2"
    >

    <action name="displaypolygon2">
    set(hotspot[spotpolygon2].borderalpha, 1);
    set(hotspot[spotpolygon2].fillalpha, 0.7);

    set(tooltip[spotpolygon2_tooltip].alpha, 1); <--- is this alright ?
    </action>


    Maybe because tooltip have to be assigned to a fixed x,y position ?
    Thanks again for your help !

    Edited 3 times, last by aircamera (December 15, 2013 at 1:53 PM).

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!