Sie sind nicht angemeldet.

1

Freitag, 12. Dezember 2014, 07:29

layertoscreen problem

Hi!

Am I doing something wrong here? I can't figure it out no matter what I try.

Quellcode

1
2
3
4
5
console.log(krpano.get("layer[rwl_fsmzob].x"));
console.log(krpano.get("layer[rwl_fsmzob].y"));
krpano.call("layertoscreen(rwl_fsmzob,layer[rwl_fsmzob].x,layer[rwl_fsmzob].y,sx,sy)"); 
console.log(krpano.get("sx"));
console.log(krpano.get("sy"));


This produces 0, 0, null, null in the log...

I read through the documentation several times, and can't find any problems. The layer in question is NOT rotated...it's a textfield layer, but I tried it with png graphics and got the same results. Any ideas?

2

Samstag, 13. Dezember 2014, 13:27

Hi,

the 'call' is not necessarily synchronized to Javascript, it just puts the call into a queue of actions.
That means the 'layertoscreen' might be not executed when you call the 'get'.

For more details please post a link to the example.

Best regards,
Klaus

3

Samstag, 13. Dezember 2014, 15:17

Thanks for the tip. I'm not at my workstation right now, but a bit later I'll try to figure out whether it's a synchronization issue like you say. Will get back with the result. Cheers!