Template:Peking2012 Color Modeling

From 2012.igem.org

(Difference between revisions)
m
m
Line 40: Line 40:
  </ul>
  </ul>
</div>
</div>
-
<div class="floatR"><p id="console"></p></div>
 
<script type="text/javascript">
<script type="text/javascript">
/*
/*
Line 61: Line 60:
  */
  */
var sublists_Num = 3; //Total Number
var sublists_Num = 3; //Total Number
-
var sublists_Cur = 1; //Current Grow
+
var sublists_Cur = -1; //Current Grow
var sublists_Now = 0; //Current Page
var sublists_Now = 0; //Current Page
var subLhght = [120,120,120]; //Unit: Pixel
var subLhght = [120,120,120]; //Unit: Pixel
Line 77: Line 76:
function listGrowth()
function listGrowth()
{
{
-
/*DEBUG*/
 
-
/*DEBUG*/
 
   subLhght_Cur[sublists_Cur] = subLhght_Cur[sublists_Cur] * 0.7 + subLhght[sublists_Cur] * 1.2 * 0.3;
   subLhght_Cur[sublists_Cur] = subLhght_Cur[sublists_Cur] * 0.7 + subLhght[sublists_Cur] * 1.2 * 0.3;
   if (subLhght_Cur[sublists_Cur]>=subLhght[sublists_Cur])
   if (subLhght_Cur[sublists_Cur]>=subLhght[sublists_Cur])
Line 118: Line 115:
function listTrigger(i)
function listTrigger(i)
{
{
-
document.getElementById('console').innerHTML=document.getElementById('console').innerHTML+"Trigger"+i+"<br>";
 
-
 
   if (subLhand_Return) {clearTimeout(subLhand_Return);subLhand_Return=null;}
   if (subLhand_Return) {clearTimeout(subLhand_Return);subLhand_Return=null;}
   if (i!=sublists_Cur)
   if (i!=sublists_Cur)
   {
   {
     if (subLhand_Growth) {clearTimeout(subLhand_Growth);}
     if (subLhand_Growth) {clearTimeout(subLhand_Growth);}
-
     if (!subLhand_Wither[sublists_Cur]) {listWither(sublists_Cur);}
+
     if (sublists_Cur>=0) {if (!subLhand_Wither[sublists_Cur]) {listWither(sublists_Cur);}}
     if (subLhand_Wither[i]) {clearTimeout(subLhand_Wither[i]);subLhand_Wither[i]=null;}
     if (subLhand_Wither[i]) {clearTimeout(subLhand_Wither[i]);subLhand_Wither[i]=null;}
     sublists[2*i+2].style.display='block';
     sublists[2*i+2].style.display='block';
Line 136: Line 131:
   subLhand_Return = setTimeout(listReturn,1000);
   subLhand_Return = setTimeout(listReturn,1000);
}
}
-
listTrigger(sublists_Now);
 
</script>
</script>
</html>
</html>

Revision as of 07:31, 15 September 2012