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.

1

Sunday, April 23rd 2017, 8:46pm

get the xml plugin name in the plugins js code?

hi klaus,

is it possible for a plugin to get its own name?

i mean if you init the plugin with:

<plugin name="mySuperPlug" url="plugins/myPlugin.js" keep="true" />

can you get "mySuperPlug" somehow in the plugins js code?

best,
index

2

Monday, April 24th 2017, 12:59am

darn... i found it already:

pluginpath here:

local.registerplugin = function(krpanointerface, pluginpath, pluginobject)
{...}

3

Monday, April 24th 2017, 6:38pm

Hi,

'pluginpath' contains a name like 'plugin[mySuperPlug]', for getting only the name just use 'pluginobject.name' (or later when the global 'plugin' variable was assigned to that object - 'plugin.name').

Best regards,
Klaus