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
b6c44e47
Commit
b6c44e47
authored
Jul 06, 2017
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed reset view
parent
0c2397ec
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
3 deletions
+44
-3
ui_init.js
js/ui_init.js
+43
-0
ui_menu.js
js/ui_menu.js
+1
-3
No files found.
js/ui_init.js
View file @
b6c44e47
...
...
@@ -193,6 +193,49 @@ function light_init(){
}
function
reset_to_initial_position
(){
$
.
ajax
({
url
:
SETTINGS
.
basepath
+
"/"
+
SETTINGS
.
path
+
"/"
+
SETTINGS
.
path
+
".kml"
,
success
:
function
(
response
){
var
longitude
=
parseFloat
(
$
(
response
).
find
(
"Camera"
).
find
(
"longitude"
).
text
());
var
latitude
=
parseFloat
(
$
(
response
).
find
(
"Camera"
).
find
(
"latitude"
).
text
());
var
altitude
=
parseFloat
(
$
(
response
).
find
(
"Camera"
).
find
(
"altitude"
).
text
());
var
heading
=
parseFloat
(
$
(
response
).
find
(
"Camera"
).
find
(
"heading"
).
text
());
var
tilt
=
parseFloat
(
$
(
response
).
find
(
"Camera"
).
find
(
"tilt"
).
text
());
var
roll
=
parseFloat
(
$
(
response
).
find
(
"Camera"
).
find
(
"roll"
).
text
());
var
fov
=
parseFloat
(
$
(
response
).
find
(
"Camera"
).
find
(
"fov"
).
text
());
Data
.
camera
=
new
X3L
({
x
:
0
,
y
:
0
,
z
:
0
,
latitude
:
latitude
||
0
,
longitude
:
longitude
||
0
,
altitude
:
altitude
||
0
,
heading
:
heading
||
0
,
tilt
:
tilt
||
0
,
roll
:
roll
||
0
,
fov
:
fov
||
0
,
});
Scene
.
old_view_translation
=
null
;
Map
.
marker
.
setHeading
(
heading
);
Map
.
marker
.
setBasePoint
(
new
L
.
LatLng
(
latitude
,
longitude
));
Map
.
marker
.
_syncMeasureMarkersToBasePoint
();
x3d_initial_camera_placement
();
//x3d_mouseMove();
Scene
.
resize
();
}
});
}
function
map_resize_init
(){
var
html
=
$
(
"<div>"
,{
id
:
"map_resizer_handle"
});
...
...
js/ui_menu.js
View file @
b6c44e47
...
...
@@ -133,9 +133,7 @@ function marker_size_color_init(){
function
reset_view_init
(){
$
(
"#reset_view"
).
on
(
'click'
,
function
(){
x3d_initial_camera_placement
();
x3d_mouseMove
();
Scene
.
resize
();
reset_to_initial_position
();
});
}
\ No newline at end of file
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