Krpano Context Menu Bug!!

  • I'm working on a tour with multiple language support. The way it works is that you open a tour_spanish.xml file, there you have a button that takes you to another tour_english.xml file through a loadpano action (with flags removescenes|ignorekeep) which works great except for the fact that it starts adding up the context menus of both tours (if I keep jumping back and forth from one to the other I end up with a context menu incredibly large and repeating). Both tours were calling a vtourskin.xml file where the context menu was, I tried taking the context menu element out of there and putting it individually in each tour file but it didn't work. Is there anything I am missing or it's just plain faulty? Any ideas on how to sort it out?

    Albertop.

  • Hi,

    any contextmenu items will not be removed by default when loading other panos - that means once set, they will kept set.

    One possibility would be 'overwriting' the items each time by using the same 'names' for these items.

    Or - to remove all currently set items (e.g. before loading another xml), calls this:

    Code
    set(contextmenu.item.count, 0);

    Or - to remove a certain item - set the name of it to null:

    Code
    set(contextmenu.item[NAME].name, null);

    Best regards,
    Klaus

  • Thank you very much, Klaus, we ended up loading a full HTML file in order to erase all data, but your suggestions might work for a future project.

    Perhaps it would be useful to have sort of a KEEPCONTEXTMENU argument when loading a new pano.

    Thank you so much!

Participate now!

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