Hello,
I am trying to draw polygons after getting data from server (geometry points). When I try following rows it doesn't fire test() function:
Test case:
function test(){
console.log("fired");
}
krpano().call("addhotspot(testhotspot)");
krpano().set("hotspot[testhotspot].onloaded","js(test())");
When I can exactly know if hotspot is loaded to put it's points or it's picture? If I try to put its points right after addhotspot() function with:
krpano().set("hotspot[testhotspot].point[0].ath","22").....
it doesn't accepts these points all the time.
I need to know a time when it is safe to put hotspot's colour, points etc but unfortunately onloaded function doesn't get fired.
edit: If you let me know when krpano does exactly fire "onloaded" event, I can put that property after creating hotspot then add the other properties at onloaded callback. Otherwise adding properties creates inconsistency and this problem doesn't seem to be solved with setTimeouts or setIntervals in javascript.