Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Amanda Ghassaei
OrigamiSimulator
Commits
98cb540c
Commit
98cb540c
authored
Jun 03, 2017
by
amandaghassaei
Browse files
file import settings
parent
7a231bb5
Changes
3
Hide whitespace changes
Inline
Side-by-side
index.html
View file @
98cb540c
...
...
@@ -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"
>
×
</span>
</button>
<p><b>
FILE IMPORT SETTINGS
</b><br/><br/>
Vertex merge tolerance (px) :
<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
js/controls.js
View file @
98cb540c
...
...
@@ -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
()){
...
...
js/pattern.js
View file @
98cb540c
...
...
@@ -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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment