Difference between revisions of "Team:Gifu/training"
Line 52: | Line 52: | ||
</td></tr></table> | </td></tr></table> | ||
− | <div id=" | + | <div id="point1"><p id="rib"></p> |
+ | <img id="ribosome" src="https://static.igem.org/mediawiki/2014/5/5f/Gifu_ribosome_renew.png"></img> | ||
+ | </div> | ||
+ | <div id="point2"><p id="rib"></p> | ||
<img id="ribosome" src="https://static.igem.org/mediawiki/2014/5/5f/Gifu_ribosome_renew.png"></img> | <img id="ribosome" src="https://static.igem.org/mediawiki/2014/5/5f/Gifu_ribosome_renew.png"></img> | ||
</div> | </div> | ||
Line 62: | Line 65: | ||
var x; | var x; | ||
var y; | var y; | ||
− | var circle =document.getElementById(" | + | var circle =document.getElementById("point1") ; |
+ | var circlea =document.getElementById("point2"); | ||
var k=90; | var k=90; | ||
var l; | var l; | ||
Line 72: | Line 76: | ||
if(m==1){ | if(m==1){ | ||
r=200; | r=200; | ||
+ | document.getElementById("point1").style.visiblity=visible; | ||
if(rad==540){rad=0; m=0; | if(rad==540){rad=0; m=0; | ||
− | document.getElementById(" | + | document.getElementById("point1").style.visiblity=hidden; |
} | } | ||
else{rad+=2}; | else{rad+=2}; | ||
Line 93: | Line 98: | ||
if(m==0){ | if(m==0){ | ||
r=100; | r=100; | ||
− | if(rad==-360){rad=180; m=1;} | + | document.getElementById("point2").style.visiblity=visible; |
+ | if(rad==-360){rad=180; m=1; | ||
+ | document.getElementById("point2").style.visiblity=hidden; | ||
+ | } | ||
else{rad-=2}; | else{rad-=2}; | ||
x=r*Math.cos(Math.PI/180*rad); | x=r*Math.cos(Math.PI/180*rad); | ||
y=r*Math.sin(Math.PI/180*rad); | y=r*Math.sin(Math.PI/180*rad); | ||
− | + | circlea.style.top=y+380+"px"; | |
− | + | circlea.style.left=x+230+"px"; | |
k-=2; | k-=2; | ||
− | + | circlea.style.transform="rotate("+k+"deg)"; | |
} | } |
Revision as of 09:44, 14 September 2015