External Javascript Function on Hotspot Clicks

  • I completely new to developing with Panotour/KRPano. I have files output from Panotour and need to call an external javascript functions to hotspot clicks. I don't want to replace what clicking the hotspot does, but just have it also call the function.

    I found this thread , which pointed me to the documentation which had the example below.

    Code in the .html or .js file:

    Code
    function test(p1, p2, p3){  alert(p1 + ": " + p2 + " / " + p3);}


    Code in the xml file:

    Code
    js( test('Lookat', get(view.hlookat), get(view.vlookat)) );




    I have a few questions about this example. Which XML file does that code go in? There are 4 in the data folders, project.xml, project_core.xml, project_messages_en.xml, and project_skin.xml. Most of them just have a <encyrpted> tag, except for project_messages_en.

    It is unclear to me how this is linked to hotspot clicks. The documentation just says it calls a javascript function, how do I control when the function is called?

    Is this code something that can be added to the exported files or does it need to be added somewhere in panotour? I am not creating the panotour, so I was hoping to do it to the rendered files.

Jetzt mitmachen!

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