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
046f0d0a
Commit
046f0d0a
authored
Aug 24, 2017
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
display world or model coordinates
parent
e837057d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
7 deletions
+31
-7
ui_init.js
js/ui_init.js
+2
-0
ui_menu.js
js/ui_menu.js
+4
-0
x3dom_init.js
js/x3dom_init.js
+21
-7
viewer.html
viewer.html
+4
-0
No files found.
js/ui_init.js
View file @
046f0d0a
...
@@ -46,6 +46,7 @@ var Map;
...
@@ -46,6 +46,7 @@ var Map;
var
SETTINGS
=
{
var
SETTINGS
=
{
'pointer'
:
false
,
'pointer'
:
false
,
'highlight'
:
false
,
'highlight'
:
false
,
'global_coordinates'
:
true
,
'markinfo'
:
true
,
'markinfo'
:
true
,
'viewinfo'
:
true
,
'viewinfo'
:
true
,
'moreinfo'
:
true
,
'moreinfo'
:
true
,
...
@@ -86,6 +87,7 @@ function parseURL(){
...
@@ -86,6 +87,7 @@ function parseURL(){
switch
(
parameters
[
i
][
0
])
{
switch
(
parameters
[
i
][
0
])
{
case
"pointer"
:
SETTINGS
.
pointer
=
true
;
break
;
case
"pointer"
:
SETTINGS
.
pointer
=
true
;
break
;
case
"highlight"
:
SETTINGS
.
highlight
=
true
;
break
;
case
"highlight"
:
SETTINGS
.
highlight
=
true
;
break
;
case
"global_coordinates"
:
SETTINGS
.
global_coordinates
=
true
;
break
;
case
"markinfo"
:
SETTINGS
.
markinfo
=
true
;
break
;
case
"markinfo"
:
SETTINGS
.
markinfo
=
true
;
break
;
case
"viewinfo"
:
SETTINGS
.
viewinfo
=
true
;
break
;
case
"viewinfo"
:
SETTINGS
.
viewinfo
=
true
;
break
;
case
"moreinfo"
:
SETTINGS
.
moreinfo
=
true
;
break
;
case
"moreinfo"
:
SETTINGS
.
moreinfo
=
true
;
break
;
...
...
js/ui_menu.js
View file @
046f0d0a
...
@@ -105,6 +105,10 @@ function menu_init(){
...
@@ -105,6 +105,10 @@ function menu_init(){
align_init
();
align_init
();
work_with_kml_init
();
work_with_kml_init
();
editmode_init
();
editmode_init
();
$
(
"#global_coordinates"
).
on
(
'click'
,
function
(){
ui_hideMessage
(
"window-markinfo"
);
});
}
}
function
crosshair_init
(){
function
crosshair_init
(){
...
...
js/x3dom_init.js
View file @
046f0d0a
...
@@ -1284,9 +1284,9 @@ X3DOMObject.displayViewInfo = function(e){
...
@@ -1284,9 +1284,9 @@ X3DOMObject.displayViewInfo = function(e){
'</tr>'
,
'</tr>'
,
'<tr>'
,
'<tr>'
,
' <td>mouse</td>'
,
' <td>mouse</td>'
,
' <td>'
+
mouse
.
real
.
x
+
'</td>'
,
' <td>'
+
(
SETTINGS
.
global_coordinates
?
mouse
.
real
.
x
:
mouse
.
x
)
+
'</td>'
,
' <td>'
+
mouse
.
real
.
y
+
'</td>'
,
' <td>'
+
(
SETTINGS
.
global_coordinates
?
mouse
.
real
.
y
:
mouse
.
y
)
+
'</td>'
,
' <td>'
+
mouse
.
real
.
z
+
'</td>'
,
' <td>'
+
(
SETTINGS
.
global_coordinates
?
mouse
.
real
.
z
:
mouse
.
z
)
+
'</td>'
,
' <td>'
+
mouse
.
a
+
'</td>'
,
' <td>'
+
mouse
.
a
+
'</td>'
,
' <td>'
+
mouse
.
e
+
'</td>'
,
' <td>'
+
mouse
.
e
+
'</td>'
,
' <td>'
+
mouse
.
s
+
'</td>'
,
' <td>'
+
mouse
.
s
+
'</td>'
,
...
@@ -1405,12 +1405,24 @@ X3DOMObject.displayMarkInfo = function(index){
...
@@ -1405,12 +1405,24 @@ X3DOMObject.displayMarkInfo = function(index){
var
marker
=
Data
.
markers
[
index
];
var
marker
=
Data
.
markers
[
index
];
var
coord
=
$
(
this
).
attr
(
"id"
).
substr
(
-
1
);
var
coord
=
$
(
this
).
attr
(
"id"
).
substr
(
-
1
);
var
x
,
y
,
z
;
if
(
SETTINGS
.
global_coordinates
){
x
=
marker
.
align
.
real
.
x
.
toFixed
(
2
);
y
=
marker
.
align
.
real
.
y
.
toFixed
(
2
);
z
=
marker
.
align
.
real
.
z
.
toFixed
(
2
);
}
else
{
x
=
marker
.
align
.
x
.
toFixed
(
2
);
y
=
marker
.
align
.
y
.
toFixed
(
2
);
z
=
marker
.
align
.
z
.
toFixed
(
2
);
}
if
(
coord
==
"x"
){
if
(
coord
==
"x"
){
$
(
this
).
val
(
marker
.
align
.
real
.
x
.
toFixed
(
2
)
);
$
(
this
).
val
(
x
);
}
else
if
(
coord
==
"y"
){
}
else
if
(
coord
==
"y"
){
$
(
this
).
val
(
marker
.
align
.
real
.
y
.
toFixed
(
2
)
);
$
(
this
).
val
(
y
);
}
else
if
(
coord
==
"z"
){
}
else
if
(
coord
==
"z"
){
$
(
this
).
val
(
marker
.
align
.
real
.
z
.
toFixed
(
2
)
);
$
(
this
).
val
(
z
);
}
}
//var xyz_real = x3dom_scene_to_real(x,y,z);
//var xyz_real = x3dom_scene_to_real(x,y,z);
...
@@ -1426,7 +1438,9 @@ X3DOMObject.displayMarkInfo = function(index){
...
@@ -1426,7 +1438,9 @@ X3DOMObject.displayMarkInfo = function(index){
z
:
parseFloat
(
$
(
"#marker_z"
).
val
())
z
:
parseFloat
(
$
(
"#marker_z"
).
val
())
};
};
if
(
SETTINGS
.
global_coordinates
){
xyz
=
x3dom_real_to_scene
(
xyz
.
x
,
xyz
.
y
,
xyz
.
z
);
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
.
place
(
xyz
.
x
,
xyz
.
y
,
xyz
.
z
,
"my-sph-"
+
index
);
X3DOMObject
.
Marker
.
slide
(
index
,
xyz
.
x
,
xyz
.
y
,
xyz
.
z
);
X3DOMObject
.
Marker
.
slide
(
index
,
xyz
.
x
,
xyz
.
y
,
xyz
.
z
);
...
...
viewer.html
View file @
046f0d0a
...
@@ -104,6 +104,10 @@ Instructions:
...
@@ -104,6 +104,10 @@ Instructions:
<div>
<div>
<h2>
Settings
</h2>
<h2>
Settings
</h2>
<table>
<table>
<tr>
<td>
Display world (checked) or model coordinates
</td>
<td><input
id=
'global_coordinates'
type=
'checkbox'
class=
'my-check-box donothide'
/></td>
</tr>
<tr>
<tr>
<td>
Show marker info (satellite vs 3D model distalnce)
</td>
<td>
Show marker info (satellite vs 3D model distalnce)
</td>
<td><input
id=
'markinfo'
type=
'checkbox'
class=
'my-check-box donothide'
/></td>
<td><input
id=
'markinfo'
type=
'checkbox'
class=
'my-check-box donothide'
/></td>
...
...
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