Hi
While they're of course similar, they're not exactly the same.
They are exactly the same

.
The 'embedpano(obj)' function was a simple wrapper for 'createPanoViewer(obj).embed()'.
The createPanoViewer() function was decrepated since version 1.17 and not documented anymore since that version.
In version 1.19-pr15 large parts of the internal structure were changed and during that also the old createPanoViewer() function finally removed.
My question is: was this an intentional choice, or is this a bug in protect?
That means that was intentional and that is not related to the protect tool, that's part of the core structure of the krpano viewer file.
But if you still need the createPanoViewer function for some reason, here a wrapper for it:
|
Quellcode
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
function createPanoViewer(obj)
{
obj = obj || {};
obj.vars = obj.vars || {};
obj.addVariable = function(a,b){ obj.vars[a]=b; };
obj.addParam = function(a,b){};
obj.passQueryParameters = function(){ obj.passQueryParameters=true; };
obj.useHTML5 = function(h){ obj.html5=h; };
obj.isHTML5possible = function(){ return true; };
obj.isFlashpossible = function(){ return !!(navigator.plugins && navigator.plugins["Shockwave Flash"]); };
obj.isDevice = function(d){ return d.indexOf("iP") >= 0 ? navigator.platform.indexOf("iP") >= 0 : d.indexOf("Android") >= 0 ? navigator.userAgent.indexOf("Android") >= 0 : false; };
obj.embed = function(t){ if(t){ obj.target=t; }; embedpano(obj); };
return obj;
}
|
But I would recommend porting to the direct usage of the embedpano() function. That should be relatively easy in the most cases.
Best regards,
Klaus