Commit c6747db3 authored by amandaghassaei's avatar amandaghassaei
Browse files

small changes

parent 6ae0a8fb
......@@ -3,7 +3,7 @@ html{
height:100%;
padding:0;
overflow: hidden;
min-width: 1080px;
min-width: 1025px;
}
body{
......@@ -12,7 +12,7 @@ body{
padding:0;
margin:0;
overflow: hidden;
min-width: 1080px;
min-width: 1025px;
/*-webkit-touch-callout: none; !* iOS Safari *!*/
/*-webkit-user-select: none; !* Chrome/Safari/Opera *!*/
/*-khtml-user-select: none; !* Konqueror *!*/
......@@ -329,10 +329,11 @@ svg{
margin-right: 20px;
}
#creasePercent{
#creasePercentNav{
margin-bottom: 0;
margin-top:9px;
margin-top:12px;
color: white;
display: none;
}
.bigLabel{
......
......@@ -483,6 +483,13 @@
<!--<li><a id="saveSVGScreenshot" href="#">Save SVG screenshot</a></li>-->
</ul>
</li>
<li class="dropdown navDropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">View <b class="caret"></b></a>
<span class="dropdown-arrow"></span>
<ul class="dropdown-menu">
<li><a id="menuVis" href="#">Toggle Menu Visibility</a></li>
</ul>
</li>
<li class="dropdown navDropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Examples <b class="caret"></b></a>
<span class="dropdown-arrow"></span>
......@@ -532,9 +539,9 @@
<!--<form class="navbar-form navbar-right" action="#" role="search">-->
<!--<div class="form-group">-->
<!--<div class="input-group">-->
<div class="sliderInput floatRight" id="creasePercent">
<span class="label-slider">Fold Angle (-1 to 1) : </span><div class="flat-slider ui-slider ui-corner-all ui-slider-horizontal ui-widget ui-widget-content"></div>
<input value="" placeholder="" class="form-control" type="text">
<div class="sliderInput floatRight" id="creasePercentNav">
<span class="label-slider">Fold Angle : </span><div class="flat-slider ui-slider ui-corner-all ui-slider-horizontal ui-widget ui-widget-content"></div>
<!--<input value="" placeholder="" class="form-control" type="text">-->
</div>
<!--</div>-->
<!--</div>-->
......@@ -548,6 +555,10 @@
<div id="threeContainer"></div>
<canvas id="gpuMathCanvas"></canvas>
<div id="controls">
<div class="sliderInput floatRight" id="creasePercent">
<span class="label-slider">Fold Angle (-1 to 1) : </span><div class="flat-slider ui-slider ui-corner-all ui-slider-horizontal ui-widget ui-widget-content"></div>
<input value="" placeholder="" class="form-control" type="text">
</div><br/><br/>
<div id="simButtons" class="alignRight">
<a href="#" id="start" class="paddingBottom btn btn-lg btn-success">Start Simulation</a>
<a href="#" id="pause" class="paddingBottom btn btn-lg btn-warning">Pause Simulation</a>
......
......@@ -14,6 +14,19 @@ function initControls(globals){
$("#activeLogo").hide();
});
setLink("#menuVis", function(){
if (globals.menusVisible){
$("#controls").fadeOut();
$("#controlsLeft").fadeOut();
$("#creasePercentNav").fadeIn();
} else {
$("#controls").fadeIn();
$("#controlsLeft").fadeIn();
$("#creasePercentNav").fadeOut();
}
globals.menusVisible = !globals.menusVisible;
});
setLink("#about", function(){
$('#aboutModal').modal('show');
});
......@@ -181,9 +194,17 @@ function initControls(globals){
globals.materialHasChanged = true;
});
setSliderInput("#creasePercent", globals.creasePercent, -1, 1, 0.01, function(val){
var creasePercentNavSlider, creasePercentSlider;
creasePercentSlider = setSliderInput("#creasePercent", globals.creasePercent, -1, 1, 0.01, function(val){
globals.creasePercent = val;
globals.shouldChangeCreasePercent = true;
creasePercentNavSlider.slider('value', val);
});
creasePercentNavSlider = setSlider("#creasePercentNav>div", globals.creasePercent, -1, 1, 0.01, function(val){
globals.creasePercent = val;
globals.shouldChangeCreasePercent = true;
creasePercentSlider.slider('value', val);
$('#creasePercent>input').val(val);
});
function setDeltaT(val){
......@@ -430,7 +451,8 @@ function initControls(globals){
slider.on("slidestop", function(){
var val = slider.slider('value');
if (callbackOnStop) callbackOnStop(val);
})
});
return slider;
}
function setLogSliderInput(id, val, min, max, incr, callback){
......@@ -508,16 +530,10 @@ function initControls(globals){
$input.val(val);
callback(val);
});
}
function update(){
function setInput(id, val){
$(id).val(val);
}
return slider;
}
return {
update:update,
setDeltaT: setDeltaT
}
}
......
......@@ -36,6 +36,8 @@ function initGlobals(){
needsSync: false,
simNeedsSync: false,
menusVisible: true,
//3d vis
simType: "dynamic",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment