layertoscreen problem

  • Hi!

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

    Code
    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?

  • 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

  • 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!

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!