Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
BlocksCAD
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
BlocksCAD
Commits
e7bc1d5e
Commit
e7bc1d5e
authored
Oct 02, 2015
by
Juan Blanco Segleau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed reset view not working after pan
parent
ae6894a9
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
10 deletions
+18
-10
blockscad/threeViewer.js
blockscad/threeViewer.js
+8
-1
blockscad/viewer_compressed.js
blockscad/viewer_compressed.js
+10
-9
No files found.
blockscad/threeViewer.js
View file @
e7bc1d5e
...
@@ -81,37 +81,44 @@ Blockscad.Viewer.prototype = {
...
@@ -81,37 +81,44 @@ Blockscad.Viewer.prototype = {
var
whichView
=
document
.
getElementById
(
"
viewMenu
"
);
var
whichView
=
document
.
getElementById
(
"
viewMenu
"
);
if
(
whichView
.
value
==
"
top
"
)
{
if
(
whichView
.
value
==
"
top
"
)
{
this
.
controls
.
reset
();
this
.
camera
.
position
.
set
(
0
,
0
,
50
);
this
.
camera
.
position
.
set
(
0
,
0
,
50
);
this
.
camera
.
lookAt
(
new
THREE
.
Vector3
(
0
,
0
,
0
)
);
this
.
camera
.
lookAt
(
new
THREE
.
Vector3
(
0
,
0
,
0
)
);
}
}
else
if
(
whichView
.
value
==
"
front
"
)
{
else
if
(
whichView
.
value
==
"
front
"
)
{
this
.
controls
.
reset
();
this
.
camera
.
position
.
set
(
0
,
-
50
,
0
);
this
.
camera
.
position
.
set
(
0
,
-
50
,
0
);
this
.
camera
.
lookAt
(
new
THREE
.
Vector3
(
0
,
0
,
0
)
);
this
.
camera
.
lookAt
(
new
THREE
.
Vector3
(
0
,
0
,
0
)
);
}
}
else
if
(
whichView
.
value
==
"
left
"
)
{
else
if
(
whichView
.
value
==
"
left
"
)
{
this
.
controls
.
reset
();
this
.
camera
.
position
.
set
(
-
50
,
0
,
0
);
this
.
camera
.
position
.
set
(
-
50
,
0
,
0
);
this
.
camera
.
lookAt
(
new
THREE
.
Vector3
(
0
,
0
,
0
)
);
this
.
camera
.
lookAt
(
new
THREE
.
Vector3
(
0
,
0
,
0
)
);
}
}
else
if
(
whichView
.
value
==
"
right
"
)
{
else
if
(
whichView
.
value
==
"
right
"
)
{
this
.
controls
.
reset
();
this
.
camera
.
position
.
set
(
50
,
0
,
0
);
this
.
camera
.
position
.
set
(
50
,
0
,
0
);
this
.
camera
.
lookAt
(
new
THREE
.
Vector3
(
0
,
0
,
0
)
);
this
.
camera
.
lookAt
(
new
THREE
.
Vector3
(
0
,
0
,
0
)
);
}
}
else
if
(
whichView
.
value
==
"
bottom
"
)
{
else
if
(
whichView
.
value
==
"
bottom
"
)
{
this
.
controls
.
reset
();
this
.
camera
.
position
.
set
(
0
,
0
,
-
50
);
this
.
camera
.
position
.
set
(
0
,
0
,
-
50
);
this
.
camera
.
lookAt
(
new
THREE
.
Vector3
(
0
,
0
,
0
)
);
this
.
camera
.
lookAt
(
new
THREE
.
Vector3
(
0
,
0
,
0
)
);
}
}
else
if
(
whichView
.
value
==
"
back
"
)
{
else
if
(
whichView
.
value
==
"
back
"
)
{
this
.
controls
.
reset
();
this
.
camera
.
position
.
set
(
0
,
50
,
0
);
this
.
camera
.
position
.
set
(
0
,
50
,
0
);
this
.
camera
.
lookAt
(
new
THREE
.
Vector3
(
0
,
0
,
0
)
);
this
.
camera
.
lookAt
(
new
THREE
.
Vector3
(
0
,
0
,
0
)
);
}
}
else
if
(
whichView
.
value
==
"
diagonal
"
)
{
else
if
(
whichView
.
value
==
"
diagonal
"
)
{
this
.
controls
.
reset
();
this
.
camera
.
position
.
set
(
50
,
-
50
,
50
);
this
.
camera
.
position
.
set
(
50
,
-
50
,
50
);
this
.
camera
.
lookAt
(
new
THREE
.
Vector3
(
0
,
0
,
0
)
);
this
.
camera
.
lookAt
(
new
THREE
.
Vector3
(
0
,
0
,
0
)
);
}
}
...
...
blockscad/viewer_compressed.js
View file @
e7bc1d5e
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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