Template:Team:UC Davis/KO3D

From 2013.igem.org

(Difference between revisions)
 
(44 intermediate revisions not shown)
Line 264: Line 264:
     $("#mutantwidget").append('<div id="mw_selectmenu"/>');
     $("#mutantwidget").append('<div id="mw_selectmenu"/>');
     $("#mutantwidget").append('<div id="mw_optionsmenu"><table id="mw_optionstable"></table></div>');
     $("#mutantwidget").append('<div id="mw_optionsmenu"><table id="mw_optionstable"></table></div>');
 +
    if($("#mutantwidget .dataMax").text() == 3)
 +
    {$("#mutantwidget").append('<div id="mw_zoommenu"><table id="mw_zoomoptionstable"></table></div>');}
Line 277: Line 279:
         }
         }
   //    $('#mw_optionstable').append("<tr><td>Sequence</td></tr>");
   //    $('#mw_optionstable').append("<tr><td>Sequence</td></tr>");
-
 
+
        if($("#mutantwidget .dataMax") .length == 1)
 +
        {
 +
            $('#mw_zoomoptionstable').append("<tr><th>Ymax</th></tr>");
 +
            $('#mw_zoomoptionstable').append("<tr><td onClick>80000</td></tr>");
 +
            $('#mw_zoomoptionstable').append("<tr><td>10000</td></tr>");
 +
            $('#mw_zoomoptionstable').append("<tr><td>2000</td></tr>");
 +
        }
     $('#mw_optionstable td').css({opacity:0.3});
     $('#mw_optionstable td').css({opacity:0.3});
 +
    $('#mw_zoomoptionstable td').css({opacity:0.3});
     $('#mutantwidget').prepend('<div id="mw_grapharea"/>');
     $('#mutantwidget').prepend('<div id="mw_grapharea"/>');
     $('#mw_grapharea').append('<div id="mw_plot"/>');
     $('#mw_grapharea').append('<div id="mw_plot"/>');
Line 307: Line 316:
         }
         }
     });
     });
 +
    $('#mw_zoommenu td').mouseover(function()
 +
    {
 +
        if(!$(this).hasClass("selected"))
 +
        {
 +
            $(this).dequeue().animate({"opacity":.6, "color":selectedColor}, 500);
 +
        }
 +
    });
 +
     $('#mw_optionsmenu td').mouseout(function()
     $('#mw_optionsmenu td').mouseout(function()
     {
     {
Line 321: Line 338:
             $(this).dequeue().animate({"opacity":.3, color:"rgb(225, 225, 225)"}, 500);
             $(this).dequeue().animate({"opacity":.3, color:"rgb(225, 225, 225)"}, 500);
         }
         }
 +
    });
 +
    $('#mw_zoommenu td').mouseout(function()
 +
    {
 +
        if(!$(this).hasClass("selected"))
 +
        {
 +
            $(this).dequeue().animate({"opacity":.3, color:"rgb(225, 225, 225)"}, 500);
 +
        }
     });
     });
 +
 +
    $('#mw_zoommenu td').click(
 +
        function()  {
 +
        if(!$(this).hasClass("selected"))
 +
        { $('#mw_zoommenu td').removeClass("selected");
 +
                $(this).addClass("selected");
 +
                $('#mw_zoommenu td').mouseout();
 +
                dataMax = $(this).text();
 +
        }
 +
        $('#mw_optionsmenu td').removeClass("selected");
 +
        if (widget_mode == "2D")
 +
          {$('#mw_optionsmenu td').eq(0).mouseover().click();}
 +
        else
 +
          {}
 +
        });
 +
       
     $('#mw_optionsmenu td').click(
     $('#mw_optionsmenu td').click(
         function() {
         function() {
Line 337: Line 377:
                     $('.yaxis').show();
                     $('.yaxis').show();
                     $('.xaxis').show();
                     $('.xaxis').show();
 +
                    $('#mw_zoommenu').show();
widget_mode = "2D";
widget_mode = "2D";
             dataseries = [];
             dataseries = [];
Line 371: Line 412:
                     $('.yaxis').hide();
                     $('.yaxis').hide();
                     $('.xaxis').hide();
                     $('.xaxis').hide();
 +
                    $('#mw_zoommenu').hide();
widget_mode = "3D";
widget_mode = "3D";
update3DPlotMeshes();
update3DPlotMeshes();
Line 444: Line 486:
     //Extract plotting data
     //Extract plotting data
     dataMax = $('#mutantwidget .dataMax').text();
     dataMax = $('#mutantwidget .dataMax').text();
 +
    if (dataMax.length == 0)
 +
    { dataMax = 90000; }
 +
    else if (dataMax == 3)
 +
    { dataMax = 80000; }
 +
    axisdimensions = [0, 1, 0, 10, 0, dataMax];
     data = [];
     data = [];
     errbars_2d = [];
     errbars_2d = [];
Line 1,003: Line 1,050:
         $('#mw_selectmenu td').eq(0).mouseover().click();
         $('#mw_selectmenu td').eq(0).mouseover().click();
         $('#mw_selectmenu td').eq(1).mouseover().click();
         $('#mw_selectmenu td').eq(1).mouseover().click();
 +
        $('#mw_selectmenu td').eq(3).mouseover().click();
         $('#mw_optionstable td').eq(1).mouseover().click();
         $('#mw_optionstable td').eq(1).mouseover().click();
 +
        $('#mw_zoomoptionstable td').eq(0).mouseover().click();
});
});
</script>
</script>
Line 1,054: Line 1,103:
background: rgba(0,0,0,.6);
background: rgba(0,0,0,.6);
}
}
 +
 +
#mw_zoommenu {
 +
top: 25px;
 +
right: 650px;
 +
padding: 3px 0px 4px 9px;
 +
position: absolute;
 +
margin: 4px;
 +
width: 80px;
 +
}
 +
 +
#mw_zoomoptionstable {
 +
margin-left: 3px;
 +
background: rgba(0,0,0,.6);
 +
}
 +
 +
#mw_zoomoptionstable th{
 +
color:rgba(225,225,225,1);
 +
}
 +
#mw_sequencearea {
#mw_sequencearea {
font-family: monospace;
font-family: monospace;

Latest revision as of 02:07, 29 October 2013