You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

nautama

Trainee

  • "nautama" started this thread

Posts: 82

Location: La Paz, Baja California Sur, México

Occupation: KRpano programmer at www.imagen360.com

  • Send private message

1

Saturday, September 13th 2014, 9:46pm

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.

2

Thursday, September 18th 2014, 6:26pm

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:

Source code

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


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

Source code

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


Best regards,
Klaus

nautama

Trainee

  • "nautama" started this thread

Posts: 82

Location: La Paz, Baja California Sur, México

Occupation: KRpano programmer at www.imagen360.com

  • Send private message

3

Friday, October 3rd 2014, 6:32pm

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!