Hi,
we are using html5 Krpano version(1.16.9)
in our ios application in some web view component.
We where trying to convert screen x,y to ath and atv by using screentosphere
function call (from js function) but it is returning wrong value.
After a lot researches and suggested solutions our final js function looks like this
but it still not working normally ...
function convertXYToAthAtv(x, y){
//IOS bug fix - Bug: screentosphere wrong in iPhone
x = x/2;
y = y/2;
GLOBAL_KRPANO_OBJECT.call("set(js_x,"+x+")");
GLOBAL_KRPANO_OBJECT.call("set(js_y,"+y+")");
GLOBAL_KRPANO_OBJECT.call("screentosphere(js_x,js_y,c_ath,c_atv)");
var ath = GLOBAL_KRPANO_OBJECT.get("c_ath");
var atv = GLOBAL_KRPANO_OBJECT.get("c_atv");
var resultArr = [ath,atv];
return JSON.stringify(resultArr);
}
Can you please helps us and point out what is wrong with it, or how we can make it work normally
Thanks