Drag the hotspot inside javascript

  • hi Hello everyone! I'm using a javascrtip production, press and hold to drag hotspot hotspot on the screen, which in javascript encountered a problem! Code stickers, and friends around the world to help me see it? Here Thank you very much! *tongue* *tongue* *tongue*


    function show_addkrpano(){
    krpano.call("addhotspot(hotspot_line);");
    krpano.set("hotspot[hotspot_line].url",'./comm_line.png');
    krpano.set("hotspot[hotspot_line].ath",krpano.get("view.hlookat"));
    krpano.set("hotspot[hotspot_line].atv",krpano.get("view.vlookat"));
    krpano.set("hotspot[hotspot_line].zoom",false);
    krpano.set("hotspot[hotspot_line].ondown",draghotspot);
    }

    function draghotspot(){
    var get_obj = krpano.get("hotspot[hotspot_line]");
    while(?????????????){
    var dx = krpano.get("mouse.stagex");
    var dy = krpano.get("mouse.stagey");
    var screarr = krpano.screentosphere(dx, dy);
    krpano.set("hotspot[hotspot_line].ath",screarr.x);
    krpano.set("hotspot[hotspot_line].atv",screarr.y);
    }
    }

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!