Beiträge von AntoineC

    Thanks Piotr.

    If i understand correctly your answer, it is not possible to include an external js file in an xml file (encrypted or not). You have to copy/paste the code in a CDATA section?

    This is cumbersome when using and IDE to code and debug the js code.

    It would nice to be able to use <include> to include an external js file. If it is possible, I believe it would be a useful feature for a future update of krpano.

    With this feature, we could keep js and xml code separated while still being able to encrypt xml and js files.

    Thanks,

    Antoine

    Hi all,

    I am writing a plug-in that needs to remove an xml attribute. Is there a way to achieve that with an Action or with JavaScript?

    To be more specific, I would like to enforce the View fovmax and fovmin even in the case the View uses the maxpixelzoom attribute. I am trying to remove maxpixelzoom since this attribute overrides fovmin.

    If it is not possible, is there another way to get the same result?

    Thanks,

    Antoine

    Hi all,

    I am trying to call a javascript function from anywhere in xml code without defining an Action and I want that function to have access to the krpano interface.

    Here is an example:

    Javascript code:

    Code
    function myjsfunction(krpano)
     {
      krpano.trace(1, "this is a test");
     }

    Xml code:

    Code
    <layer name="mylayer" onloaded="myfunctionaction()" type="container" keep="true" width="100" height="100" align="center" bgalpha="1" />
    <action name="myfunctionaction" type="Javascript">
      <![CDATA[
      myjsfunction(krpano);
      ]]>
      </action>

    I wish to get rid of the Action and do something like that:

    Code
    <layer name="mylayer" onloaded="js(myjsfunction(???))" type="container" keep="true" width="100" height="100" align="center" bgalpha="1" />

    How can I pass the krpano interface to the javascript function when using js() to call it?

    Best regards,

    Antoine