Page 1 of 1

Reading API Variables in the Skin

Posted: Tue Jul 26, 2022 2:47 pm
by NFSTC
We have situations where we lock the interaction of the panorama using the JS API (via the pano.setLocked(true) function). I would like to be able to read that variable in my skin and turn off visibility to all skin components when this is enabled.

I see that there is a way to do this with the API by changing a skin variable with the function below and then I could set an action in the skin for visibility: pano.setVariableValue(varName:String, varValue:Any).

However, I'd prefer to not change the JS at this point and would rather read that state of the panorama to set the action in the skin (the JS code is not mine so I like to modify it as little as possible). Is there a way to read if the pano is set to 'Locked' within the skin so that I can trigger an action to disable the skin components?

Thank you!

Re: Reading API Variables in the Skin

Posted: Thu Aug 11, 2022 4:36 pm
by Hopki
Hi,
Reading your post, I understand you want to lock the panorama, and prevent any interaction.
The JavaScript call javascript: player.setLocked(true); only stops the mouse, mouse wheel and keyboard, however you can still click on skin elements.

What would be a better solution is to show an active container 100% of the player size.
You can have this show and hide using a variable, so just use the JS to change the variable.

This leads to another question, how are you using the javascript, for example, javascript: player.setLocked(true); can be used in a Go To URL action.
Regards,