Commit ba1a6fea authored by amandaghassaei's avatar amandaghassaei
Browse files

small changes

parent 790f6eb6
...@@ -319,3 +319,9 @@ svg{ ...@@ -319,3 +319,9 @@ svg{
#stepForward{ #stepForward{
margin-left: 13px; margin-left: 13px;
} }
#creasePercent{
margin-bottom: 0;
margin-top:9px;
color: white;
}
...@@ -414,6 +414,16 @@ ...@@ -414,6 +414,16 @@
<li><a id="about" class="menuHoverControls" target="_blank" href="#">About</a></li> <li><a id="about" class="menuHoverControls" target="_blank" href="#">About</a></li>
<li><a id="tips" class="menuHoverControls" target="_blank" href="#">File Import Tips</a></li> <li><a id="tips" class="menuHoverControls" target="_blank" href="#">File Import Tips</a></li>
</ul> </ul>
<!--<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>
<!--</div>-->
<!--</div>-->
<!--</form>-->
</div><!-- /.navbar-collapse --> </div><!-- /.navbar-collapse -->
<input id="fileSelector" type="file"> <input id="fileSelector" type="file">
...@@ -438,12 +448,6 @@ ...@@ -438,12 +448,6 @@
<input id="userInteractionEnabled" data-toggle="checkbox" class="custom-checkbox layersSelector" type="checkbox"><span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span> <input id="userInteractionEnabled" data-toggle="checkbox" class="custom-checkbox layersSelector" type="checkbox"><span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span>
Allow User Interaction Allow User Interaction
</label><br/> </label><br/>
<b>Fold Settings:</b><br/><br/>
<div class="sliderInput" id="creasePercent">
<span class="label-slider">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/><br/>
<b>Stiffness Settings:</b><a class="floatRight about" href="#" id="aboutStiffness"><span class="fui-question-circle"></span></a><br/><br/> <b>Stiffness Settings:</b><a class="floatRight about" href="#" id="aboutStiffness"><span class="fui-question-circle"></span></a><br/><br/>
<div class="sliderInput" id="axialStiffness"> <div class="sliderInput" id="axialStiffness">
<span class="label-slider">Axial Stiffness : </span><div class="flat-slider ui-slider ui-corner-all ui-slider-horizontal ui-widget ui-widget-content"></div> <span class="label-slider">Axial Stiffness : </span><div class="flat-slider ui-slider ui-corner-all ui-slider-horizontal ui-widget ui-widget-content"></div>
...@@ -606,12 +610,14 @@ ...@@ -606,12 +610,14 @@
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
<p><b>Import FOLD</b><br/><br/> <p><b>Import FOLD</b><br/><br/>
use angles as target thetas <label class="checkbox" for="foldUseAngles">
<input id="foldUseAngles" data-toggle="checkbox" class="custom-checkbox layersSelector" type="checkbox"><span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span>
Use current angles as target fold angles
</label>
</p> </p>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button id="doImportFold" type="button" class="btn btn-success">Import</button> <button data-dismiss="modal" type="button" class="btn btn-success">OK</button>
<button type="button" class="btn btn default" data-dismiss="modal">Cancel</button>
</div> </div>
</div><!-- /.modal-content --> </div><!-- /.modal-content -->
</div><!-- /.modal-dialog --> </div><!-- /.modal-dialog -->
......
...@@ -174,7 +174,15 @@ function initControls(globals){ ...@@ -174,7 +174,15 @@ function initControls(globals){
} }
globals.filename = name; globals.filename = name;
globals.extension = extension; globals.extension = extension;
parseFoldJSON(JSON.parse(reader.result)); if (reader.result && reader.result.edges_foldAngles){
parseFoldJSON(JSON.parse(reader.result));
return;
}
$("#importFoldModal").modal("show");
$('#importFoldModal').on('hidden.bs.modal', function () {
parseFoldJSON(JSON.parse(reader.result));
});
} }
}(file); }(file);
reader.readAsText(file); reader.readAsText(file);
...@@ -444,6 +452,10 @@ function initControls(globals){ ...@@ -444,6 +452,10 @@ function initControls(globals){
if (!val) globals.UI3D.hideHighlighters(); if (!val) globals.UI3D.hideHighlighters();
}); });
setCheckbox($("#foldUseAngles"), globals.foldUseAngles, function(val){
globals.foldUseAngles = val;
});
function setButtonGroup(id, callback){ function setButtonGroup(id, callback){
$(id+" a").click(function(e){ $(id+" a").click(function(e){
e.preventDefault(); e.preventDefault();
......
...@@ -48,6 +48,7 @@ function initGlobals(){ ...@@ -48,6 +48,7 @@ function initGlobals(){
//import pattern settings //import pattern settings
vertTol: 3,//vertex merge tolerance vertTol: 3,//vertex merge tolerance
foldUseAngles: true,
//save stl settings //save stl settings
filename: null, filename: null,
......
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