How to get current krpano version   [SOLVED] - View the solution

Share your tips and tricks here or get help with any Panotour 2.0+ problem!
No bug reports (of any kind) in this forum!
no avatar
Abusername
Member
 
Topic author
Posts: 15
Likes: 1 post
Liked in: 0 post
Joined: Mon Feb 26, 2018 2:26 pm
Info

How to get current krpano version  [SOLVED]

by Abusername » Mon Mar 12, 2018 2:26 pm

Hello.

I'm trying to do something very simple, getting the current krpano version in a custom plugin like so:

Code: Select all
var krpano = document.getElementById('krpanoSWFObject');
console.log("krpano version: "+krpano.version);


I get the following output in the console:

Code: Select all
krpano version: undefined


I can access the krpano object just fine, in fact my plugin works perfectly, but there are some properties missing. Version being a prime example. Why is this?

The reason I'm asking is that I need access to the WebGL canvas of the krpano script but I can't even get the current version.

no avatar
Abusername
Member
 
Topic author
Posts: 15
Likes: 1 post
Liked in: 0 post
Joined: Mon Feb 26, 2018 2:26 pm
Info

Re: How to get current krpano version

by Abusername » Tue Mar 13, 2018 1:47 pm

Could someone maybe show me some documentation on the difference between the krpano standalone and the one used in Panotours?

User avatar
360-compunics-com-ni
Member
 
Posts: 418
Likes: 15 posts
Liked in: 163 posts
Joined: Wed Dec 17, 2014 12:37 am
Location: León, Nicaragua
Info

Re: How to get current krpano version

by 360-compunics-com-ni » Tue Mar 13, 2018 3:15 pm

You need to call the 'get'-function to assign a KRPano variable:
Code: Select all
var v = krpano().get('version');
console.log('version: '+v);
Out now: DeviceCheck for PTP plugins! https://www.kolor.com/forum/viewtopic.php?f=40&t=37446

Want to know how clients use your tours? Google Analytics Track Events plugin: http://www.kolor.com/forum/viewtopic.php?f=40&t=34442

Add actions to your hotspots: Hotspot Actionlist plugin: http://www.kolor.com/forum/viewtopic.php?f=40&t=35829

no avatar
Abusername
Member
 
Topic author
Posts: 15
Likes: 1 post
Liked in: 0 post
Joined: Mon Feb 26, 2018 2:26 pm
Info

Re: How to get current krpano version

by Abusername » Tue Mar 13, 2018 3:16 pm

Thank you very much. I get the version but the canvas and context return null.


Who is online

Users browsing this forum: No registered users and 2 guests

cron