Distorted hotspot html problem

  • Hi all

    I have followed the tutorial of klause on the distorted hotspot

    I have succeeded in making it and it works in .swf and tour_editor.html mode, it does not however work in html mode. the pano loads, and when you hover over the candle to click nothing happens, the cursor changes to a hand so it knows the hotspot is there... what could be the problem?

    CLICK ON THE CANDLE

    .swf version

    html version

    .xml

    I use mac and firefox

    Please help me figure this out.

    Thanks
    jaco

  • Hi,

    in HTML5 polygonal hotspots are not supported at the moment!
    See here:
    https://krpano.com/docu/html5/#supportedfunctionality

    That means for html5 you would need to use directly the onclick event of the image hotspot instead of using the polygonal hotspot as hit-area.

    e.g. simply add the here red-marked line - this will add an onclick event only for html5 for the spotNNN hotspot element:
    <hotspot name="spotNNN" .... />
    <hotspot name="spotNNN" onclick="switch(alpha,0,1);" devices="html5" />
    <hotspot name="hs1" onclick="switch(hotspot[spotNNN].alpha,0,1)" ... />

    Best regards,
    Klaus

  • Hi Klaus

    Thanks for the reply, it works.

    However no when i click it moves the image i used the same

    onloaded="calc_pos_from_hfov_yaw_pitch_roll(11, -68.5993, 29.0215, -24.4857);" as the original hotspot, can this be made to not move too?

    And also for some reason the html file does not open in google chrome, it reads an error but in firefox and safari its ok.


    Also, is it possible to do this in panotour pro too?
    Thanks
    Jacob

  • Hi,

    However no when i click it moves the image i used the same

    onloaded="calc_pos_from_hfov_yaw_pitch_roll(11, -68.5993, 29.0215, -24.4857);" as the original hotspot, can this be made to not move too?

    Sorry, but I don't understand what you mean...

    And also for some reason the html file does not open in google chrome, it reads an error but in firefox and safari its ok.

    Chrome and IE10 don't allow loading local xml files in html5.
    Try using the krpano Testing Server for local testing:
    New Tool: krpano Testing Server

    Best regards,
    Klaus

  • What I mean is on the original pano, when I click its pixel perfect because I uses your method of ptgui in the pool tutorial.

    When I add that line you wrote in red it loads in HTML but the image is not aligned anymore. It shifts a couple of pixels, enough to notice

  • That is the weirdest thing

    I tested it locally on firefox and the image moves.

    I have now replaced the xml online and its perfect. I also just tested it on safari locally and its fine aswell.

    Sorry, i should have tested the published version too.

    I made a video on my phone to show how the image shifted on firefox locally.
    Firefox image shift
    All is good now.
    Thanks Klaus

  • Hi,

    okay, this is a known Firefox CSS3D issue - on some devices Firefox renders CSS3D inaccurately and on some others not. I don't know the exact reason, but a workaround doesn't seems to be possible - I know that problem since a long time and tried several ways to workaround it, but in the end, this is a bug that need to be fixed by the Firefox developers.

    Best regards,
    Klaus

Jetzt mitmachen!

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