Html5 tooltip always visible

  • Is it possible ho make html5 tooltips always visible?
    I'm building an html5 only tour (with panotour pro) where there are a lot of country flag hotspots. My average user won't able to recognize ALL the flags, so I need to show the flag (hotspot icon) and the country name (the tooltip?).
    This is a multilanguage tour so I'm trying to find a way to avoid putting the name of the country in the icon (I should create an "Italy" icon for english, "Italia" for italian and "Italie" for french, and so on)

    My idea is to create a text layer for each country. Always visible, and "moving" as the view changes, somehow following "its" hotspot. But I don't know hot to make it work...
    Looking at the code generated by Panotour, related to tooltips, I found
    out that the tooltip layer is positioned in relation to mouse position. I think I have to calculate x and y position starting from hotspot.ath / atv view.hlookat / vlookat. Does it make any sense???

    This is a scratch for my solution... can you help me please?

    Code
    <layer name="ItalyTooltip" [...] visible="true" html="ITALY" />
    <events onviewchange="moveTooltip();" />
    <action name="moveTooltip">
    	set(layer[get(ItalyTooltip)].x, ???);
    	set(layer[get(ItalyTooltip)].y, ???);
    </action>
  • Yes it is possible. Easiest is to put tooltip as children from that hotspot and that way you don't need to calculate anything. You also need to have as many tooltip layers as many hostpots you want to display tooltip all the time (1:1 relation)

  • Zitat

    Yes it is possible. Easiest is to put tooltip as children from that hotspot and that way you don't need to calculate anything. You also need to have as many tooltip layers as many hostpots you want to display tooltip all the time (1:1 relation)

    What do you mean by adding tooltip as child of the hotspot? Currently I have :

    Code
    <hotspot name="spotpoint5085" ath="30.310442" atv="-5.254237" visible="true"  style="IconDefaultPointSpotStyle5"  descriptionid="" handcursor="false"  tooltip="spotpoint5085_tooltip"           />


    and the style:

    Code
    <style name="IconDefaultPointSpotStyle5" url="%FIRSTXML%/spots/info_rambam_st_user_defaultpoint4.png"  visible="true" onhover="onhoverIconDefaultPointSpotStyle5"  onover="onoverIconDefaultPointSpotStyle5"	 onout="onoutIconDefaultPointSpotStyle5"         />


    The tooltip is shown only onHover (which make sense) but I can't figure how to set it visibile at the hotspot position all the time.

  • Using this https://krpano.com/forum/wbb/inde…50929#post50929 tutorial from Klaus you can have something like this:

  • Thanks for the fast response Umalo.
    I'm getting this error when implementing your code:

    Zitat

    WARNING: Locally not trusted - External Interface NOT available!

    and then alot of another warnings and few errors all with error number 2060.
    The issue seems to be related to to security options.
    Any idea?

    EDIT:
    Issue solved by setting security setting of the flash player - follow this link.
    Your code works perfectly, thanks alot!

    3 Mal editiert, zuletzt von Yuval (8. Juli 2015 um 12:38)

  • I've added it and it lookes like this:

    But it doesn't work...

  • Yes you are right, now I tried in the code and it should be:

    Code
    set(plugin[get(tooltipname)].oy,60);


    Maybe easier to use:

    Code
    set(plugin[get(tooltipname)].align,bottom); set(plugin[get(tooltipname)].edge,top);


    to make toolips below hotspot without tweaking oy attribute.

  • Sorry for digging with the tooltip, but I would like to maximize it's abilities.
    I have 2 issues to fix, the first is how to define the tooltip text as RTL instead of default LTR?
    When the text is RTL i have "," at the start instead of the end.

    Another one is that I have a rectangle as the tooltip background. Is it possible to change that rectangle color and opacity?

  • The RTL issue is fixed, but I'm still unable to set backgroup specific to the tooltip text.
    I've tried

    Code
    set(plugin[get(tooltipname)].fillcolor,0xD0D0D0);

    inside the action of my style but it doesnt change anything...

  • hi. i made a plugin that puts the hotspot's-name under every hotspot as a textfield automatically.
    like the tooltip is visible always an clickable if you want to.
    textfield can be edited of course.
    simple integration.
    works also in VR and smartphone, or touch devices.
    DEMO_TOUR_EXAMPLE
    would that help you? or do you need something else?

Jetzt mitmachen!

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