Hi,
I have just tried updating my site to v1.21 only to find out that js() calls from xml no longer work.
js( console.log(1) ); does nothing
js( "console.log(1)" ); as well
while jscall( console.log(1) ); works fine
Hi,
I have just tried updating my site to v1.21 only to find out that js() calls from xml no longer work.
js( console.log(1) ); does nothing
js( "console.log(1)" ); as well
while jscall( console.log(1) ); works fine
Hi,
thanks, right!
That will be fixed with the next release.
But generally I would recommend switching to using jscall(). Even with the fix, the js() action will be limited to calling only one Javascript function, where with jscall you can call any arbitrary code.
Best regards,
Klaus
Hi,
actually I did change some js() calls into jscall() but what about the ones using action arguments, like
js( console.log(get(%1)); );
?
Thank you, krpano.get('%1') was the way to go.
Version 1.21 indeed seems to be noticeably faster on a scene with lots of text hotspots.
Hi,
thanks, right!
That will be fixed with the next release.But generally I would recommend switching to using jscall(). Even with the fix, the js() action will be limited to calling only one Javascript function, where with jscall you can call any arbitrary code.
Best regards,
Klaus
Personally, I prefer to use js not jscall, although they can achieve the same function
Hi,
there is a new build (2023-02-09) where this is fixed now.
Personally, I prefer to use js not jscall, although they can achieve the same function
No problem with that, the main difference between js() and jscall() is that js() can only call one Javascript-Function, where in jscall() you can use any kind of Javascript code.
Don’t have an account yet? Register yourself now and be a part of our community!