Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
freecad_x3d
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
freecad_x3d
Commits
b8639e79
Commit
b8639e79
authored
Feb 19, 2016
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean up
parent
7efaa25e
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
123 additions
and
223 deletions
+123
-223
help.js
x3d_web_viewer/help.js
+100
-0
index.html
x3d_web_viewer/index.html
+2
-8
viewmodel.js
x3d_web_viewer/viewmodel.js
+21
-215
No files found.
x3d_web_viewer/help.js
0 → 100644
View file @
b8639e79
//Requires:
// <script src="jquery-2.1.4.min.js"></script>
// <script src="bootstrap/js/bootstrap.min.js"></script>
function
init_help
(
element
){
var
help_str
=
"
\
<table>
\
<tr>
\
<td>Display area:<td>
\
</tr>
\
<tr>
\
<td valign='top'> <b>• left-click:</b></td>
\
<td valign='top'>select/deselect part and its copies</td>
\
</tr>
\
<tr>
\
<td valign='top'> <b>• left-click + move:</b></td>
\
<td valign='top'>rotate</td>
\
</tr>
\
<tr>
\
<td valign='top'> <b>• right-click:</b></td>
\
<td valign='top'>hide part and its copies</td>
\
</tr>
\
<tr>
\
<td valign='top'> <b>• right-click + move:</b></td>
\
<td valign='top'>zoom</td>
\
</tr>
\
<tr>
\
<td valign='top'> <b>• middle-click + move:</b></td>
\
<td valign='top'>drag</td>
\
</tr>
\
<tr>
\
<td valign='top'> <b>• dbl-left-click:</b></td>
\
<td valign='top'>hide part and its copies, <span style='color:rgba(255,100,100,1)'><b>interferes with center of rotation</b></span></td>
\
</tr>
\
<tr>
\
<td valign='top'> <b>• dbl-middle-click:</b></td>
\
<td valign='top'>set center of rotation</td>
\
</tr>
\
<tr>
\
<td>Side buttons (if enabled):</td>
\
</tr>
\
<tr>
\
<td> <b>• <span style='padding:1px 5px;background:green;border-radius:2px 0px 0px 2px;'>abc</span><span style='padding:1px 5px;background:white;border-radius:0px 2px 2px 0px;color:black;'>▾</span> <b>:</b></td>
\
<td><b>abc</b> = Part Number</td>
\
</tr>
\
<tr>
\
<td> <b>• <span style='padding:1px 5px;background:green;border-radius:2px 0px 0px 2px;'>abc</span> left-click:</b></td>
\
<td>select / single / hide / delesect</td>
\
</tr>
\
<tr>
\
<td> <b>• dropdown</b> <span style='padding:1px 5px;background:green;border-radius:2px;'>all</span> <b>:</b></td>
\
<td>hide/show part and its copies</td>
\
</tr>
\
<tr>
\
<td> <b>• dropdown</b> <span style='padding:1px 5px;background:green;border-radius:2px;'>1</span> <b>:</b></td>
\
<td>hide/show single part or copy</td>
\
</tr>
\
<tr>
\
<td>X3DOM controls help:</td>
\
</tr>
\
<tr>
\
<td> <b>• <a href='http://www.x3dom.org/documentation/interaction/' style='color:white'><img src='http://www.x3dom.org/wp-content/themes/x3domnew/x3dom_logo.png' style='background:rgba(250,250,250,0.8);height:25px;padding:3px'/> www.x3dom.org</a></td>
\
</tr>
\
<tr>
\
<td>Source code:</td>
\
</tr>
\
<tr>
\
<td> <b>• <a href='https://github.com/Elphel/freecad_x3d' style='color:white'><img src='http://blog.elphel.com/wp-content/themes/pixelgreen/images/blog-logo.png' style='height:25px;'/> Elphel <img src='https://github.com/fluidicon.png' style='height:25px;'/> github.com</a></td>
\
</tr>
\
</table>
\
"
;
var
hlp
=
$
(
"<div>"
).
addClass
(
"btn btn-primary nooutline btn-sm btn-my"
).
html
(
"?"
);
hlp
.
css
({
position
:
"absolute"
,
right
:
"3px"
,
top
:
"3px"
,
background
:
"rgba(100,100,100,0.7)"
,
border
:
"1px solid gray"
,
padding
:
"0px 6px 0px 6px"
});
var
hlp_text
=
$
(
"<div>"
,{
id
:
"help-text"
}).
css
({
position
:
"absolute"
,
top
:
"2px"
,
right
:
"2px"
,
"border-radius"
:
"2px"
,
border
:
"1px solid gray"
,
color
:
"white"
,
"font-size"
:
"1.2em"
,
padding
:
"10px 10px 10px 10px"
,
background
:
"rgba(50,50,50,0.9)"
,
display
:
"none"
,
"z-index"
:
"100"
});
hlp_text
.
html
(
help_str
);
hlp
.
click
(
function
(){
hlp_text
.
css
({
display
:
""
});});
hlp_text
.
click
(
function
(){
$
(
this
).
css
({
display
:
"none"
});});
element
.
append
(
hlp
).
append
(
hlp_text
);
}
\ No newline at end of file
x3d_web_viewer/index.html
View file @
b8639e79
...
@@ -7,17 +7,11 @@
...
@@ -7,17 +7,11 @@
<script
src=
"jquery-2.1.4.min.js"
></script>
<script
src=
"jquery-2.1.4.min.js"
></script>
<!--<script type='text/javascript' src='x3dom-1.7.0/x3dom.js'> </script>-->
<!--<script type='text/javascript' src='x3dom-1.7.0/x3dom.js'> </script>-->
<script
src=
"bootstrap/js/bootstrap.min.js"
></script>
<script
src=
"bootstrap/js/bootstrap.min.js"
></script>
<script
src=
"help.js"
></script>
<script
src=
"viewmodel.js"
></script>
<script
src=
"viewmodel.js"
></script>
</head>
</head>
<body>
<body>
<div
id=
'main'
>
<div
id=
'main'
>
<!-- <x3d id='x3d_canvas' width='700px' height='600px' showProgress="true" showStat="true" showLog="true">
<scene>
<navigationinfo id="navi" type='"examine" "any"' ></navigationinfo>
<Viewpoint fieldOfView='0.2'></Viewpoint>
<inline id='topinline' nameSpaceName="foo" url="models/nc393_07_flat_noassy.x3d" onLoad = "document.getElementById('x3d_canvas').runtime.showAll()"></inline>
</scene>
</x3d>-->
<div
id=
'thrd'
>
<div
id=
'thrd'
>
<div
class=
"dropdown"
>
<div
class=
"dropdown"
>
<button
class=
"btn-my dropdown-toggle btn nooutline"
data-toggle=
"dropdown"
href=
"#"
>
View
<span
class=
"caret"
></span></button>
<button
class=
"btn-my dropdown-toggle btn nooutline"
data-toggle=
"dropdown"
href=
"#"
>
View
<span
class=
"caret"
></span></button>
...
...
x3d_web_viewer/viewmodel.js
View file @
b8639e79
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