How to set autorotate's enabled with JS code

  • I add a hotspot in my pano

    Code
    <hotspot name="hs1" style="polygonal_style" 
    onclick="js(openFineView(1,'./popFineView/artworks/pic_a01/iViewer.xml',1,'初夏的黄连树',get(data[a01].content)));set(autorotate.enabled,false);"  >			
                  <point ath="-149.304507" atv="-6.413643" />			
                  <point ath="-140.364913" atv="-6.940917" />			
                  <point ath="-140.207234" atv="0.973232" />			
                  <point ath="-149.500649" atv="0.883999" />		
    </hotspot>



    it will open a fullscreen window to show my pic,when I close this window,I want the autorotate.enabled set as true.
    I tried this code in js:

    Code
    fineView.prototype.close = function() {
    		 krpano.call("set(autorotate.enabled,true);");
    		 var a = this.getDialogDiv();
     		 a.parentNode.removeChild(a); 
    		 a = null;
     		 willAnimate = false;
     		 zoomIn = true;			 
                     this.closed = true;		 
    };

    But it didn't work,how should I do next?

  • Are there some Javascript errors?

    HI klaus,Thank you for your reply

    when I click the button,there's no javascipt errors come out,and it will close my window normally,but the pano will not autorotation after the window closed.
    it just do not work

    Code
    <img width="40px" height="40px" onclick="fineView.getInstance().close();" src="' + skinPath + 'close1.png"/>

Participate now!

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