Commit 98cb540c authored by amandaghassaei's avatar amandaghassaei
Browse files

file import settings

parent 7a231bb5
......@@ -550,6 +550,7 @@
<span class="dropdown-arrow"></span>
<ul class="dropdown-menu">
<li><a class="loadFile" href="#">Import... (SVG / FOLD)</a></li>
<li><a id="importSettings" href="#">SVG Import Settings...</a></li>
<li><a id="tips" href="#">File Import Tips</a></li>
<li class="divider"></li>
<li><a id="exportFOLD" href="#">Save Simulation as FOLD...</a></li>
......@@ -1232,5 +1233,20 @@
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<div class="modal fade" id="importSettingsModal" tabindex="-1" role="dialog">
<div class="modal-dialog sm">
<div class="modal-content">
<div class="modal-body">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<p><b>FILE IMPORT SETTINGS</b><br/><br/>
Vertex merge tolerance (px) : &nbsp;&nbsp;<input id="vertTol" value="" placeholder="" class="float form-control" type="text">
</p>
</div>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
</body>
</html>
\ No newline at end of file
......@@ -143,6 +143,13 @@ function initControls(globals){
globals.threeView.setBackgroundColor();
});
setLink("#importSettings", function(){
$("#importSettingsModal").modal("show");
});
setInput("#vertTol", globals.vertTol, function(val){
globals.vertTol = val;
});
setLink("#navPattern", function(){
if (globals.noCreasePatternAvailable()){
......
......@@ -623,8 +623,8 @@ function initPattern(globals){
}
if (_weededVertices.length > 0){
// console.log(_weededVertices);
if (badColors.length==0) globals.warn("<br/>Some vertices are not fully connected,<br/>" +
"try increasing vertex merge tolerance.<br/>" +
if (badColors.length==0) globals.warn("<br/>Some vertices are not fully connected, " +
"try increasing vertex merge tolerance ( <b>File > SVG Import Settings...</b> ). <br/><br/>" +
"Aborting file import.<br/><br/>");
else $("#warningMessage").append("This error caused the file import to abort.<br/><br/>");
return true;
......
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