Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
x3domlet
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Elphel
x3domlet
Commits
312c254f
Commit
312c254f
authored
Aug 17, 2017
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input change marker coordinates
parent
b85c5312
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
83 additions
and
19 deletions
+83
-19
ui.css
js/ui.css
+10
-4
x3dom_init.js
js/x3dom_init.js
+70
-12
viewer.html
viewer.html
+3
-3
No files found.
js/ui.css
View file @
312c254f
...
@@ -258,7 +258,7 @@ html, body, #x3d_wrapper {
...
@@ -258,7 +258,7 @@ html, body, #x3d_wrapper {
border-radius
:
1px
;
border-radius
:
1px
;
color
:
black
;
color
:
black
;
font-size
:
16px
;
font-size
:
16px
;
margin-
top
:
2px
;
margin-
bottom
:
2px
;
}
}
#window-viewinfo
td
{
#window-viewinfo
td
{
...
@@ -272,7 +272,7 @@ html, body, #x3d_wrapper {
...
@@ -272,7 +272,7 @@ html, body, #x3d_wrapper {
border-radius
:
1px
;
border-radius
:
1px
;
color
:
black
;
color
:
black
;
font-size
:
16px
;
font-size
:
16px
;
margin-
top
:
2px
;
margin-
bottom
:
2px
;
}
}
#window-markinfo
td
{
#window-markinfo
td
{
...
@@ -286,7 +286,7 @@ html, body, #x3d_wrapper {
...
@@ -286,7 +286,7 @@ html, body, #x3d_wrapper {
border-radius
:
1px
;
border-radius
:
1px
;
color
:
red
;
color
:
red
;
font-size
:
16px
;
font-size
:
16px
;
margin-
top
:
2px
;
margin-
bottom
:
2px
;
}
}
.input
{
.input
{
...
@@ -308,7 +308,7 @@ html, body, #x3d_wrapper {
...
@@ -308,7 +308,7 @@ html, body, #x3d_wrapper {
#info-wrapper
{
#info-wrapper
{
position
:
absolute
;
position
:
absolute
;
left
:
2px
;
left
:
2px
;
bottom
:
2px
;
top
:
2px
;
}
}
/*button with icon*/
/*button with icon*/
...
@@ -347,6 +347,7 @@ html, body, #x3d_wrapper {
...
@@ -347,6 +347,7 @@ html, body, #x3d_wrapper {
left
:
2px
;
left
:
2px
;
background
:
rgba
(
256
,
256
,
256
,
1
);
background
:
rgba
(
256
,
256
,
256
,
1
);
padding
:
5px
;
padding
:
5px
;
border
:
1px
solid
rgba
(
200
,
200
,
200
,
0.5
);
}
}
#aa1_dialog
td
{
#aa1_dialog
td
{
...
@@ -356,3 +357,8 @@ html, body, #x3d_wrapper {
...
@@ -356,3 +357,8 @@ html, body, #x3d_wrapper {
#aa1_dialog
button
{
#aa1_dialog
button
{
margin
:
0px
5px
;
margin
:
0px
5px
;
}
}
.marker_coordinates
{
width
:
50px
;
text-align
:
right
;
}
js/x3dom_init.js
View file @
312c254f
...
@@ -1353,18 +1353,40 @@ X3DOMObject.displayMarkInfo = function(index){
...
@@ -1353,18 +1353,40 @@ X3DOMObject.displayMarkInfo = function(index){
msg
=
[
msg
=
[
'<div>Marker '
+
index
+
' (Satellite vs 3D model)</div>'
,
'<div>Marker '
+
index
+
' (Satellite vs 3D model)</div>'
,
'<table>'
,
'<table>'
,
'<tr title=
\'
drag marker over map to update distance
\'
>'
,
' <tr>'
,
' <th align=
\'
left
\'
>d<sub>map</sub></th>'
,
' <td>'
,
' <td align=
\'
left
\'
style=
\'
text-align:left;
\'
>'
+
d_map_msg
+
'</td>'
,
' <table title=
\'
change coordinates to move marker
\'
>'
,
'</tr>'
,
' <tr>'
,
'<tr title=
\'
drag marker over 3d scene to update distance
\'
>'
,
' <th>x</th>'
,
' <th align=
\'
left
\'
>d<sub>3d</sub></th>'
,
' <th>y</th>'
,
' <td align=
\'
left
\'
style=
\'
text-align:left;
\'
>'
+
d_x3d_msg
+
'</td>'
,
' <th>z</th>'
,
'</tr>'
,
' </tr>'
,
'<tr>'
,
' <tr>'
,
' <th align=
\'
center
\'
>Δ</th>'
,
' <td><input type=
\'
text
\'
id=
\'
marker_x
\'
index='
+
index
+
' class=
\'
marker_coordinates
\'
/></td>'
,
' <td align=
\'
left
\'
style=
\'
text-align:left;
\'
>'
+
delta
+
' m</td>'
,
' <td><input type=
\'
text
\'
id=
\'
marker_y
\'
index='
+
index
+
' class=
\'
marker_coordinates
\'
/></td>'
,
'</tr>'
,
' <td><input type=
\'
text
\'
id=
\'
marker_z
\'
index='
+
index
+
' class=
\'
marker_coordinates
\'
/></td>'
,
' </tr>'
,
' </table>'
,
' </td>'
,
' </tr>'
,
' <tr>'
,
' <td>'
,
' <table>'
,
' <tr title=
\'
drag marker over map to update distance
\'
>'
,
' <th align=
\'
left
\'
>d<sub>map</sub></th>'
,
' <td align=
\'
left
\'
style=
\'
text-align:left;
\'
>'
+
d_map_msg
+
'</td>'
,
' </tr>'
,
' <tr title=
\'
drag marker over 3d scene to update distance
\'
>'
,
' <th align=
\'
left
\'
>d<sub>3d</sub></th>'
,
' <td align=
\'
left
\'
style=
\'
text-align:left;
\'
>'
+
d_x3d_msg
+
'</td>'
,
' </tr>'
,
' <tr>'
,
' <th align=
\'
center
\'
>Δ</th>'
,
' <td align=
\'
left
\'
style=
\'
text-align:left;
\'
>'
+
delta
+
' m</td>'
,
' </tr>'
,
' </table>'
,
' </td>'
,
' </tr>'
,
'</table>'
'</table>'
].
join
(
'
\
n'
);
].
join
(
'
\
n'
);
...
@@ -1376,6 +1398,42 @@ X3DOMObject.displayMarkInfo = function(index){
...
@@ -1376,6 +1398,42 @@ X3DOMObject.displayMarkInfo = function(index){
ui_showMessage
(
"window-markinfo"
,
msg
);
ui_showMessage
(
"window-markinfo"
,
msg
);
}
}
// enable input fields here
$
(
".marker_coordinates"
).
each
(
function
(){
var
index
=
parseInt
(
$
(
this
).
attr
(
"index"
));
var
marker
=
Data
.
markers
[
index
];
var
coord
=
$
(
this
).
attr
(
"id"
).
substr
(
-
1
);
if
(
coord
==
"x"
){
$
(
this
).
val
(
marker
.
align
.
real
.
x
.
toFixed
(
2
));
}
else
if
(
coord
==
"y"
){
$
(
this
).
val
(
marker
.
align
.
real
.
y
.
toFixed
(
2
));
}
else
if
(
coord
==
"z"
){
$
(
this
).
val
(
marker
.
align
.
real
.
z
.
toFixed
(
2
));
}
//var xyz_real = x3dom_scene_to_real(x,y,z);
$
(
this
).
on
(
'change'
,
function
(){
var
index
=
parseInt
(
$
(
this
).
attr
(
"index"
));
var
marker
=
Data
.
markers
[
index
];
var
coord
=
$
(
this
).
attr
(
"id"
).
substr
(
-
1
);
var
xyz
=
{
x
:
parseFloat
(
$
(
"#marker_x"
).
val
()),
y
:
parseFloat
(
$
(
"#marker_y"
).
val
()),
z
:
parseFloat
(
$
(
"#marker_z"
).
val
())
};
xyz
=
x3dom_real_to_scene
(
xyz
.
x
,
xyz
.
y
,
xyz
.
z
);
X3DOMObject
.
Marker
.
place
(
xyz
.
x
,
xyz
.
y
,
xyz
.
z
,
"my-sph-"
+
index
);
X3DOMObject
.
Marker
.
slide
(
index
,
xyz
.
x
,
xyz
.
y
,
xyz
.
z
);
});
});
}
}
X3DOMObject
.
createNewMarker
=
function
(
x
,
y
,
z
){
X3DOMObject
.
createNewMarker
=
function
(
x
,
y
,
z
){
...
...
viewer.html
View file @
312c254f
...
@@ -95,10 +95,10 @@ Instructions:
...
@@ -95,10 +95,10 @@ Instructions:
</div>
</div>
<div
id=
'info-wrapper'
>
<div
id=
'info-wrapper'
>
<div
id=
'window-info'
></div>
<div
id=
'window-markinfo'
></div>
<div
id=
'window-viewinfo'
></div>
<div
id=
'window-error'
></div>
<div
id=
'window-error'
></div>
<div
id=
'window-viewinfo'
></div>
<div
id=
'window-markinfo'
></div>
<div
id=
'window-info'
></div>
</div>
</div>
<div
id=
'menu-content'
>
<div
id=
'menu-content'
>
<div>
<div>
...
...
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