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
13abc0ab
Commit
13abc0ab
authored
Jul 23, 2018
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing base point and marker sliding
parent
8b7cb1da
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
2 deletions
+23
-2
ui_init.js
js/ui_init.js
+23
-2
No files found.
js/ui_init.js
View file @
13abc0ab
...
@@ -661,6 +661,11 @@ function x3d_events(){
...
@@ -661,6 +661,11 @@ function x3d_events(){
var
x
,
y
,
z
;
var
x
,
y
,
z
;
var
dist
=
1111
;
var
dist
=
1111
;
var
campos
=
x3dom_getCameraPosOr
();
var
xc
=
campos
.
x
;
var
yc
=
campos
.
y
;
var
zc
=
campos
.
z
;
var
mouse
=
x3dom_getXYPosOr
(
e
.
path
[
0
].
mouse_drag_x
,
e
.
path
[
0
].
mouse_drag_y
,
false
);
var
mouse
=
x3dom_getXYPosOr
(
e
.
path
[
0
].
mouse_drag_x
,
e
.
path
[
0
].
mouse_drag_y
,
false
);
if
(
mouse
.
d_xz
!=
null
){
if
(
mouse
.
d_xz
!=
null
){
...
@@ -675,7 +680,11 @@ function x3d_events(){
...
@@ -675,7 +680,11 @@ function x3d_events(){
}
}
Map
.
marker
.
placeSlidingMarker
(
mouse
.
a
,
dist
);
var
da
=
x3dom_getDistAngle
(
mouse
.
x
-
xc
,
mouse
.
y
-
yc
,
mouse
.
z
-
zc
);
var
distance
=
da
[
0
];
var
angle
=
da
[
1
];
Map
.
marker
.
placeSlidingMarker
(
angle
,
distance
);
}
else
{
}
else
{
...
@@ -806,8 +815,20 @@ function x3d_events(){
...
@@ -806,8 +815,20 @@ function x3d_events(){
if
(
$
(
".GroupTop"
).
attr
(
"bboxSize"
)
!=
undefined
){
if
(
$
(
".GroupTop"
).
attr
(
"bboxSize"
)
!=
undefined
){
dist_default
=
parseFloat
(
$
(
".GroupTop"
).
attr
(
"bboxSize"
).
trim
().
split
(
" "
)[
2
]);
dist_default
=
parseFloat
(
$
(
".GroupTop"
).
attr
(
"bboxSize"
).
trim
().
split
(
" "
)[
2
]);
}
}
var
campos
=
x3dom_getCameraPosOr
();
var
xc
=
campos
.
x
;
var
yc
=
campos
.
y
;
var
zc
=
campos
.
z
;
var
da
=
x3dom_getDistAngle
(
mouse
.
x
-
xc
,
mouse
.
y
-
yc
,
mouse
.
z
-
zc
);
var
distance
=
da
[
0
];
var
angle
=
da
[
1
];
var
dist
=
parseFloat
(
mouse
.
d_xz
)
||
dist_default
;
var
dist
=
parseFloat
(
mouse
.
d_xz
)
||
dist_default
;
Map
.
marker
.
placeSlidingMarker
(
mouse
.
a
,
dist
);
//Map.marker.placeSlidingMarker(mouse.a,dist);
Map
.
marker
.
placeSlidingMarker
(
angle
,
distance
);
}
else
{
}
else
{
...
...
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