Is there any documentation for how to use the vars object to set krpano variables when using the embedpano() function? What is the syntax?
Regards,
Karel
How to use the vars object with embedpano?
-
-
Hi,
that's a Javascript Object, and you can define the variables with it's values as properties of that object,
e.g.
Codeembedpano({xml:"krpano.xml", target:"krpanoDIV", vars:{onstart:"trace(hello)", simulatedevice:"UserAgent"}});
or create the vars object before the embedding and then pass it:
Codevar vars = {}; vars["onstart"] = "trace(hello);"; vars["plugin[test].url"] = "test.jpg"; ... embedpano({xml:"krpano.xml", target:"krpanoDIV", vars:vars}});
best regards,
Klaus -
Thanks Klaus :)
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!